]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Give a better name to a function and also use the server Elo indicator.
authorAnt Zucaro <azucaro@gmail.com>
Fri, 11 Nov 2016 22:30:24 +0000 (17:30 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Fri, 11 Nov 2016 22:30:24 +0000 (17:30 -0500)
xonstat/views/submission.py

index 8e39017cf7024cc01318d9614f3849b1707e6fbb..75c0f017e9b83538ceeb8c3b2a034b63e89fd4ec 100644 (file)
@@ -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)