mai2: add rivals support
This commit is contained in:
1 parent
123ec99a97
commit
eccbd1ad81
2 files changed
+62
-4
No files matched your search
@@ -319,16 +319,16 @@ class Mai2ScoreData(BaseData):
|
||||
sql = best_score.select(
|
||||
and_(
|
||||
best_score.c.user == user_id,
|
||||
(best_score.c.song_id == song_id) if song_id is not None else True,
|
||||
(best_score.c.musicId == song_id) if song_id is not None else True,
|
||||
)
|
||||
)
|
||||
).order_by(best_score.c.musicId).order_by(best_score.c.level)
|
||||
else:
|
||||
sql = best_score_old.select(
|
||||
and_(
|
||||
best_score_old.c.user == user_id,
|
||||
(best_score_old.c.song_id == song_id) if song_id is not None else True,
|
||||
(best_score_old.c.musicId == song_id) if song_id is not None else True,
|
||||
)
|
||||
)
|
||||
).order_by(best_score.c.musicId).order_by(best_score.c.level)
|
||||
|
||||
result = await self.execute(sql)
|
||||
if result is None:
|
||||
|
||||
Reference in new issue
Block a user