Skip to content

Commit eeffcd8

Browse files
committed
Mark score not ranked if not passed
1 parent 8268b7d commit eeffcd8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: app/Models/Solo/Score.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,12 @@ public static function extractParams(array $rawParams, ScoreToken|MultiplayerSco
118118
$params['started_at'] = $scoreToken->created_at;
119119
$params['user_id'] = $scoreToken->user_id;
120120

121+
$params['passed'] ??= false;
122+
$params['preserve'] = $params['passed'];
123+
121124
$beatmap = $scoreToken->beatmap;
122125
// anything that have leaderboard
123-
$params['ranked'] = $beatmap !== null && $beatmap->approved > 0;
124-
125-
$params['preserve'] = $params['passed'] ?? false;
126+
$params['ranked'] = $params['passed'] && $beatmap !== null && $beatmap->approved > 0;
126127

127128
return $params;
128129
}

0 commit comments

Comments
 (0)