From 0b2237d2803f66f95c3496fa95b3aef7f3b6ea87 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 24 Sep 2024 13:12:51 +0800 Subject: [PATCH] fix max participants bug. --- src/Commands/EnterLotteryHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/EnterLotteryHandler.php b/src/Commands/EnterLotteryHandler.php index 444377c..83f1459 100644 --- a/src/Commands/EnterLotteryHandler.php +++ b/src/Commands/EnterLotteryHandler.php @@ -112,7 +112,7 @@ public function handle(EnterLottery $command) ]); } - if($lottery->getAttribute('enter_count')>$lottery->getAttribute('max_participants')){ + if($lottery->getAttribute('enter_count')>=$lottery->getAttribute('max_participants')){ throw new ValidationException([ 'lottery' => $this->translator->trans('nodeloc-lottery.forum.too_many_participants'), ]);