Skip to content

Commit c805470

Browse files
authored
Merge pull request #11056 from nanaya/ranked-score
Fix initial ranked flag to match latest update
2 parents 02367fe + ff55501 commit c805470

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/Models/Solo/Score.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use App\Libraries\Score\UserRank;
1414
use App\Libraries\Search\ScoreSearchParams;
1515
use App\Models\Beatmap;
16-
use App\Models\Beatmapset;
1716
use App\Models\Model;
1817
use App\Models\Multiplayer\ScoreLink as MultiplayerScoreLink;
1918
use App\Models\Score as LegacyScore;
@@ -120,10 +119,8 @@ public static function extractParams(array $rawParams, ScoreToken|MultiplayerSco
120119
$params['user_id'] = $scoreToken->user_id;
121120

122121
$beatmap = $scoreToken->beatmap;
123-
$params['ranked'] = $beatmap !== null && in_array($beatmap->approved, [
124-
Beatmapset::STATES['approved'],
125-
Beatmapset::STATES['ranked'],
126-
], true);
122+
// anything that have leaderboard
123+
$params['ranked'] = $beatmap !== null && $beatmap->approved > 0;
127124

128125
$params['preserve'] = $params['passed'] ?? false;
129126

0 commit comments

Comments
 (0)