Fix json bug

This commit is contained in:
Daochen Zha 2021-06-02 01:47:01 -05:00
parent 31723396ea
commit 68eba9a37b
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ def replay(request):
index = request.GET['index'] index = request.GET['index']
g = Game.objects.get(name=name, agent0=agent0, agent1=agent1, index=index) g = Game.objects.get(name=name, agent0=agent0, agent1=agent1, index=index)
json_data = g.replay json_data = g.replay
return HttpResponse(json_data) return HttpResponse(json.dumps(json.loads(json_data)))
def query_game(request): def query_game(request):
if request.method == 'GET': if request.method == 'GET':