Skip to content

Commit

Permalink
Merge branch 'tre-varaamo-qa' into tre-varaamo
Browse files Browse the repository at this point in the history
  • Loading branch information
jopesy committed Dec 17, 2024
2 parents 8a4158d + f57ee68 commit 10c77c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/models/reservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,8 @@ def clean(self, **kwargs):
)
# Exclude current reservation from the valid_reservations_for_same_unit list to allow user to
# update reservation if new times overlaps only with the original times of the same reservation
if original_reservation := kwargs.get("original_reservation", None):
original_reservation = kwargs.get("original_reservation", None)
if original_reservation:
valid_reservations_for_same_unit = valid_reservations_for_same_unit.exclude(id=original_reservation.id)

user_has_conflicting_reservations = valid_reservations_for_same_unit.filter(
Expand Down

0 comments on commit 10c77c5

Please sign in to comment.