1
0
mirror of synced 2024-11-12 01:00:46 +01:00

Switch to a comprehension instead of appending in user.

This commit is contained in:
Jennifer Taylor 2023-03-19 18:54:29 +00:00
parent bce2fa0624
commit 383de2a070

View File

@ -606,13 +606,15 @@ class UserData(BaseData):
elif profilever[tuid] != version:
profilever[tuid] = max(profilever[tuid], tver)
result = []
for uid in userids:
if uid not in profilever:
result.append((uid, None))
else:
result.append((uid, self.get_profile(game, profilever[uid], uid)))
return result
return [
(
uid,
self.get_profile(game, profilever[uid], uid)
if uid in profilever
else None,
)
for uid in userids
]
def get_games_played(
self, userid: UserID, game: Optional[GameConstants] = None