From 398ad6dab7534370a2ff1517e828556d3ad1c654 Mon Sep 17 00:00:00 2001 From: Venix <30481900+venix12@users.noreply.github.com> Date: Thu, 26 Dec 2024 22:20:48 +0100 Subject: [PATCH] check total score before querying season count --- app/Models/Multiplayer/Room.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Multiplayer/Room.php b/app/Models/Multiplayer/Room.php index d85b3e9b596..1009f6326ea 100644 --- a/app/Models/Multiplayer/Room.php +++ b/app/Models/Multiplayer/Room.php @@ -448,7 +448,7 @@ public function completePlay(ScoreToken $scoreToken, array $params): ScoreLink } // spotlight playlists should always be linked to one season exactly - if ($this->category === 'spotlight' && $this->seasons()->count() === 1 && $agg->total_score > 0) { + if ($this->category === 'spotlight' && $agg->total_score > 0 && $this->seasons()->count() === 1) { $seasonId = $this->seasons()->first()->getKey(); $seasonScore = $user->seasonScores()