Skip to content

Commit f57ee68

Browse files
authored
Merge pull request #187 from andersinno/python3-6-fix
Fix Python 3.6 compatibility issue with code
2 parents 3ab3604 + a36c56c commit f57ee68

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

resources/models/reservation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,8 @@ def clean(self, **kwargs):
711711
)
712712
# Exclude current reservation from the valid_reservations_for_same_unit list to allow user to
713713
# update reservation if new times overlaps only with the original times of the same reservation
714-
if original_reservation := kwargs.get("original_reservation", None):
714+
original_reservation = kwargs.get("original_reservation", None)
715+
if original_reservation:
715716
valid_reservations_for_same_unit = valid_reservations_for_same_unit.exclude(id=original_reservation.id)
716717

717718
user_has_conflicting_reservations = valid_reservations_for_same_unit.filter(

0 commit comments

Comments
 (0)