Skip to content

Commit

Permalink
fix overlaping retreat date
Browse files Browse the repository at this point in the history
  • Loading branch information
RignonNoel committed Sep 14, 2020
1 parent 9f31e31 commit 70ac2a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions retirement/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def validate(self, attrs):
active_reservations = active_reservations.all()

for reservation in active_reservations:
for date in reservation.retreat.retreat_dates:
for date in reservation.retreat.retreat_dates.all():
latest_start = max(
date.start_time,
start,
Expand Down Expand Up @@ -592,7 +592,7 @@ def update(self, instance, validated_data):
).exclude(pk=instance.pk)

for reservation in active_reservations:
for date in reservation.retreat.retreat_dates:
for date in reservation.retreat.retreat_dates.all():
latest_start = max(
date.start_time,
start,
Expand Down

0 comments on commit 70ac2a9

Please sign in to comment.