]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Isolate the weapon rename to the weapon_cd only.
authorAnt Zucaro <azucaro@gmail.com>
Sat, 13 Dec 2014 04:11:21 +0000 (23:11 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Sat, 13 Dec 2014 04:11:21 +0000 (23:11 -0500)
xonstat/views/submission.py

index dc5fa03ebf2a4b2e565214fc590ab87701ff04fb..069018261b91f6fee7c9dc152b86f0d822b74443 100644 (file)
@@ -760,7 +760,7 @@ def create_weapon_stats(session, game_meta, game, player, pgstat, events):
 \r
             # Weapon names changed for 0.8. We'll convert the old\r
             # ones to use the new scheme as well.\r
-            weapon_cd = weapon_map.get(weapon_cd, weapon_cd)\r
+            mapped_weapon_cd = weapon_map.get(weapon_cd, weapon_cd)\r
 \r
             seq = Sequence('player_weapon_stats_player_weapon_stats_id_seq')\r
             pwstat_id = session.execute(seq)\r
@@ -769,7 +769,7 @@ def create_weapon_stats(session, game_meta, game, player, pgstat, events):
             pwstat.player_id = player.player_id\r
             pwstat.game_id = game.game_id\r
             pwstat.player_game_stat_id = pgstat.player_game_stat_id\r
-            pwstat.weapon_cd = weapon_cd\r
+            pwstat.weapon_cd = mapped_weapon_cd\r
 \r
             if 'n' in events:\r
                 pwstat.nick = events['n']\r