]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Don't die if no favorite map exists.
authorAnt Zucaro <azucaro@gmail.com>
Sat, 7 Jul 2012 01:43:28 +0000 (21:43 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sat, 7 Jul 2012 01:43:28 +0000 (21:43 -0400)
xonstat/views/player.py

index 513f59f1754aebad443c7a4c762cb5638305a1d0..b1fbd5d8ca643ef2f84613fc345dbace2126000f 100644 (file)
@@ -258,7 +258,10 @@ def player_info_data(request):
         (total_games, games_breakdown) = _get_games_played(player.player_id)
 
         # favorite map from the past 90 days
-        fav_map = _get_fav_map(player.player_id)
+        try:
+            fav_map = _get_fav_map(player.player_id)
+        except:
+            fav_map = None
 
         # friendly display of elo information and preliminary status
         elos = DBSession.query(PlayerElo).filter_by(player_id=player_id).\