From: Ant Zucaro Date: Fri, 11 Nov 2016 22:30:24 +0000 (-0500) Subject: Give a better name to a function and also use the server Elo indicator. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a4ec7db887faa82ee42695b3045a8f6501edef05;p=xonotic%2Fxonstat.git Give a better name to a function and also use the server Elo indicator. --- diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index 8e39017..75c0f01 100644 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -279,7 +279,7 @@ def should_do_weapon_stats(game_type_cd): return True -def should_do_elos(game_type_cd): +def gametype_elo_eligible(game_type_cd): """True of the game type should process Elos. False otherwise.""" elo_game_types = ('duel', 'dm', 'ca', 'ctf', 'tdm', 'ka', 'ft') @@ -945,7 +945,7 @@ def submit_stats(request): except Exception as e: raise e - if should_do_elos(game_type_cd): + if server.elo_ind and gametype_elo_eligible(game_type_cd): ep = EloProcessor(session, game, pgstats) ep.save(session)