Skip to content

Commit

Permalink
Fix BikeAdd people check
Browse files Browse the repository at this point in the history
  • Loading branch information
odolbeau committed Jul 15, 2024
1 parent a110970 commit 2dc2195
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Admin/Controller/Registration/BikeAddController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(

public function __invoke(Registration $registration): Response
{
if ($registration->getNeededBike() > $registration->countPeople()) {
if ($registration->getNeededBike() >= $registration->countPeople()) {
$this->addFlash('danger', 'Impossible de demander plus de vélos que de personnes !');

return $this->redirectToRoute('admin_registration_show', ['id' => $registration->getId()]);
Expand Down

0 comments on commit 2dc2195

Please sign in to comment.