Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ezkat committed Jul 8, 2020
1 parent 356343b commit 5e2ff17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/models/reservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def set_state(self, new_state, user):
reservation_modified.send(sender=self.__class__, instance=self, user=user)
return
if new_state == Reservation.CONFIRMED:
self.approver = user if user.is_authenticated else None
self.approver = user if user and user.is_authenticated else None
if user.is_authenticated or self.resource.authentication == 'unauthenticated':
reservation_confirmed.send(sender=self.__class__, instance=self,
user=user)
Expand Down

0 comments on commit 5e2ff17

Please sign in to comment.