Skip to content

Commit

Permalink
[backend] Fix confirmation réservation sur animation sans nombre de p…
Browse files Browse the repository at this point in the history
…laces
  • Loading branch information
marcantoinedupre committed Jun 29, 2023
1 parent 8ec1c56 commit adabbb9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/core/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ def confirm_reservation():
event = resa.event
if not event.is_reservation_possible_for(resa.nb_participants):
raise EventIsFull
elif not event.capacity:
resa.liste_attente = False

Check warning on line 376 in backend/core/routes.py

View check run for this annotation

Codecov / codecov/patch

backend/core/routes.py#L375-L376

Added lines #L375 - L376 were not covered by tests
elif event.sum_participants + resa.nb_participants <= event.capacity:
resa.liste_attente = False
else:
Expand Down

0 comments on commit adabbb9

Please sign in to comment.