From 9987525159cc4ed3ce1922b63d506e8f9df1eeb4 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Wed, 20 Jan 2016 21:46:22 -0500 Subject: [PATCH] The player JSON view should use to_dict() instead. --- xonstat/views/player.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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): -- 2.39.2