From 97883cacc2293b8430f183991d6a8e2e7b96c8f0 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Thu, 26 May 2011 13:05:39 -0400 Subject: [PATCH] Change weapon stats view to build the weapon_stats array in a more pythonic way. --- xonstat/views/player.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xonstat/views/player.py b/xonstat/views/player.py index 36e8b29..59fdce2 100755 --- a/xonstat/views/player.py +++ b/xonstat/views/player.py @@ -106,10 +106,8 @@ def player_weapon_stats(request): all() # turn this into something the accuracy template can use - weapon_stats = [] - for (pwstat, weapon) in pwstats: - weapon_stats.append((weapon.descr, pwstat.weapon_cd, pwstat.fired, - pwstat.hit, pwstat.max, pwstat.actual)) + weapon_stats = [(weapon.descr, pwstat.weapon_cd, pwstat.actual, + pwstat.max, pwstat.hit, pwstat.fired) for (pwstat, weapon) in pwstats] pgstat = DBSession.query(PlayerGameStat).\ filter_by(player_game_stat_id=pgstat_id).one() -- 2.39.2