We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3ab3604 + a36c56c commit f57ee68Copy full SHA for f57ee68
resources/models/reservation.py
@@ -711,7 +711,8 @@ def clean(self, **kwargs):
711
)
712
# Exclude current reservation from the valid_reservations_for_same_unit list to allow user to
713
# update reservation if new times overlaps only with the original times of the same reservation
714
- if original_reservation := kwargs.get("original_reservation", None):
+ original_reservation = kwargs.get("original_reservation", None)
715
+ if original_reservation:
716
valid_reservations_for_same_unit = valid_reservations_for_same_unit.exclude(id=original_reservation.id)
717
718
user_has_conflicting_reservations = valid_reservations_for_same_unit.filter(
0 commit comments