Fix another rank -> scoreboardpos bug.
authorAnt Zucaro <azucaro@gmail.com>
Wed, 26 Jun 2013 11:44:08 +0000 (07:44 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Wed, 26 Jun 2013 11:44:08 +0000 (07:44 -0400)
xonstat/views/helpers.py

index a3b3f53..8a10a48 100644 (file)
@@ -119,12 +119,12 @@ def recent_games_q(server_id=None, map_id=None, player_id=None,
                 filter(PlayerGameStat.player_id==player_id)
         else:
             recent_games_q = recent_games_q.\
-                filter(PlayerGameStat.rank==1).\
+                filter(PlayerGameStat.scoreboardpos==1).\
                 filter(Game.game_id==pgstat_alias.game_id).\
                 filter(pgstat_alias.player_id==player_id)
     else:
         recent_games_q = recent_games_q.\
-            filter(PlayerGameStat.rank==1)
+            filter(PlayerGameStat.scoreboardpos==1)
 
     if game_type_cd is not None:
         recent_games_q = recent_games_q.\