From: Ant Zucaro Date: Tue, 17 Oct 2017 00:09:21 +0000 (-0400) Subject: Properly account for Elo opt-outs. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=52f366672777143a066216c8d6973a3866ac4db2;p=xonotic%2Fxonstat.git Properly account for Elo opt-outs. --- diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index a830a3f..8b42dbc 100644 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -612,7 +612,7 @@ def create_game(session, game_type_cd, server_id, map_id, match_id, start_dt, du game.mod = mod[:64] # There is some drift between start_dt (provided by app) and create_dt - # (default in the database), so we'll make them the same until this is + # (default in the database), so we'll make them the same until this is # resolved. game.create_dt = start_dt @@ -1148,7 +1148,10 @@ def submit_stats(request): frag_matrix = create_frag_matrix(session, submission.player_indexes, pgstat, events) # player ranking opt-out - if 'r' in events and events['r'] != '0': + if 'r' in events and events['r'] == '0': + log.debug("Excluding player {} from ranking calculations (opt-out)" + .format(pgstat.player_id)) + else: elo_pgstats.append(pgstat) if player.player_id > 1: