]> git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Fix player_info template for missing player.
authorAnt Zucaro <azucaro@gmail.com>
Mon, 30 Apr 2012 10:40:37 +0000 (06:40 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Mon, 30 Apr 2012 10:40:37 +0000 (06:40 -0400)
xonstat/templates/player_info.mako
xonstat/views/player.py

index 0764facce60720849c1556c7085cff5f9bda6ce4..c0875840d33ff59ddba55c1636ee2115e8bf4d04 100755 (executable)
@@ -7,6 +7,7 @@ ${nav.nav('players')}
 </%block>
 
 <%block name="js">
+    % if player is not None:
       <script src="/static/js/jquery-1.7.1.min.js"></script>
       <script src="/static/js/jquery.flot.min.js"></script>
       <script type="text/javascript">
@@ -53,6 +54,7 @@ ${nav.nav('players')}
           });
       })
       </script>
+    % endif
 </%block>
 
 <%block name="title">
@@ -91,7 +93,6 @@ Player Information
     </p>
   </div>
 </div>
-% endif
 
 
 % if accs is not None:
@@ -209,3 +210,4 @@ Player Information
   </div>
 </div>
 % endif
+% endif
index 44ea9de1893fdf5513482e6ba959c0605910c73e..c20a61894982b7c790ece948815f5e681acc04ac 100755 (executable)
@@ -211,7 +211,7 @@ def player_info(request):
         recent_games = None\r
         total_games = None\r
         games_breakdown = None\r
-        recent_weapons = None\r
+        recent_weapons = []\r
 \r
     return {'player':player,\r
             'elos_display':elos_display,\r