Skip to content

Commit

Permalink
check total score before querying season count
Browse files Browse the repository at this point in the history
  • Loading branch information
venix12 committed Dec 26, 2024
1 parent a704104 commit 398ad6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Multiplayer/Room.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 398ad6d

Please sign in to comment.