]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Fix type error on ARRAY assertion.
authorAnt Zucaro <azucaro@gmail.com>
Thu, 25 Dec 2014 03:36:55 +0000 (22:36 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Thu, 25 Dec 2014 03:36:55 +0000 (22:36 -0500)
xonstat/views/player.py

index c3e5120984680ce361713c84b1ebd125f4aa0f11..4b4017f171d7efb762ac7dc487d2083b366e9737 100644 (file)
@@ -581,7 +581,10 @@ def player_info_json(request):
 
 
 def player_game_index_data(request):
-    player_id = request.matchdict['player_id']
+    try:
+        player_id = int(request.matchdict['player_id'])
+    except:
+        player_id = -1
 
     game_type_cd = None
     game_type_descr = None
@@ -621,6 +624,7 @@ def player_game_index_data(request):
         games_played = get_games_played(player_id)
 
     except Exception as e:
+        raise e
         player = None
         games = None
         game_type_cd = None