Skip to content

Commit

Permalink
Merge pull request #187 from andersinno/python3-6-fix
Browse files Browse the repository at this point in the history
Fix Python 3.6 compatibility issue with code
  • Loading branch information
jopesy authored Dec 17, 2024
2 parents 3ab3604 + a36c56c commit f57ee68
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 f57ee68

Please sign in to comment.