Skip to content

Commit

Permalink
Fix bug 2
Browse files Browse the repository at this point in the history
  • Loading branch information
JobDoesburg committed Apr 2, 2024
1 parent c1a66c5 commit 5826891
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion website/venues/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ def send_reservation_status_change_email_receiver(sender, instance, **kwargs):
if instance.pk is None or instance.user_created is None:
return

old_instance = Reservation.objects.get(pk=instance.pk)
try:
old_instance = Reservation.objects.get(pk=instance.pk)
except Reservation.DoesNotExist:
return

if old_instance.accepted != instance.accepted:
send_reservation_status_change_email(instance)

Expand Down

0 comments on commit 5826891

Please sign in to comment.