get_filter_categories(): fix, add room_type=5: Quick Tournament(?)

This commit is contained in:
Jylpah committed 2021-09-10 21:03:41 +03:00
1 parent eb39c9ce84
commit 050bd99488
1 file changed
+4 -1
+4 -1
View File
@@ -167,6 +167,7 @@ class BattleCategorizationList():
'Regular' : 1, 'Regular' : 1,
'Training Room' : 2, 'Training Room' : 2,
'Tournament' : 4, 'Tournament' : 4,
'Quick Tournament' : 5, # maybe?
'Rating' : 7, 'Rating' : 7,
'Mad Games' : 8, 'Mad Games' : 8,
'Realistic Battles' : 22, 'Realistic Battles' : 22,
@@ -416,7 +417,7 @@ class BattleCategorizationList():
def get_filter_categories(self, cat: str, filters: list) -> dict: def get_filter_categories(self, cat: str, filters: list) -> dict:
try: try:
return self.categorizations[cat].get_filter_categories(filters) return self.categorizations[str(cat)].get_filter_categories(filters)
except Exception as err: except Exception as err:
bu.error(exception=err) bu.error(exception=err)
return None return None
@@ -1577,6 +1578,8 @@ async def main(argv):
players = get_players(results) players = get_players(results)
replays = filter_replays(replays, results) replays = filter_replays(replays, results)
(player_stats, stat_id_map) = await process_player_stats(players, OPT_WORKERS_N, args, db) (player_stats, stat_id_map) = await process_player_stats(players, OPT_WORKERS_N, args, db)
bu.debug('Number of player stats: ' + str(len(player_stats))) bu.debug('Number of player stats: ' + str(len(player_stats)))
teamresults = calc_team_stats(results, player_stats, stat_id_map, args) teamresults = calc_team_stats(results, player_stats, stat_id_map, args)