From a4ec7db887faa82ee42695b3045a8f6501edef05 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Fri, 11 Nov 2016 17:30:24 -0500 Subject: [PATCH] Give a better name to a function and also use the server Elo indicator. --- xonstat/views/submission.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.39.2