Win/loss should use scoreboardpos, not rank.
authorAnt Zucaro <azucaro@gmail.com>
Tue, 9 Apr 2013 02:26:44 +0000 (22:26 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Tue, 9 Apr 2013 02:26:44 +0000 (22:26 -0400)
xonstat/views/player.py

index e3b385337cd5ccffea7befdec97d0162374041d7..a183114bd341dbafd0767ad6b0ce290dbad1e4ad 100644 (file)
@@ -75,12 +75,12 @@ def get_games_played(player_id):
                                "g.game_type_cd, "
                                "CASE "
                                  "WHEN g.winner = pgs.team THEN 1 "
-                                 "WHEN pgs.rank = 1 THEN 1 "
+                                 "WHEN pgs.scoreboardpos = 1 THEN 1 "
                                  "ELSE 0 "
                                "END win, "
                                "CASE "
                                  "WHEN g.winner = pgs.team THEN 0 "
-                                 "WHEN pgs.rank = 1 THEN 0 "
+                                 "WHEN pgs.scoreboardpos = 1 THEN 0 "
                                  "ELSE 1 "
                                "END loss "
                         "FROM   games g, "