From: Ant Zucaro Date: Thu, 21 Jan 2016 02:46:22 +0000 (-0500) Subject: The player JSON view should use to_dict() instead. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9987525159cc4ed3ce1922b63d506e8f9df1eeb4;p=xonotic%2Fxonstat.git The player JSON view should use to_dict() instead. --- diff --git a/xonstat/views/player.py b/xonstat/views/player.py index 5f6cba2..26da28f 100644 --- a/xonstat/views/player.py +++ b/xonstat/views/player.py @@ -564,9 +564,7 @@ def player_info_json(request): for gt,mapinfo in player_info['fav_maps'].items(): fav_maps[gt] = to_json(mapinfo) - recent_games = [] - for game in player_info['recent_games']: - recent_games.append(to_json(game)) + recent_games = [g.to_dict() for g in player_info['recent_games']] return [{ 'player': player, @@ -577,7 +575,6 @@ def player_info_json(request): 'ranks': ranks, 'recent_games': recent_games, }] - #return [{'status':'not implemented'}] def player_game_index_data(request):