From e8344951f8a3f42301b7e12370a976c246bbc2e5 Mon Sep 17 00:00:00 2001 From: Laurent Date: Sat, 8 Mar 2025 08:42:09 +0100 Subject: [PATCH] attempt to fix --- tournaments/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tournaments/views.py b/tournaments/views.py index 5eefc8c..e3044ba 100644 --- a/tournaments/views.py +++ b/tournaments/views.py @@ -359,8 +359,10 @@ def tournament_matches_json(request, tournament_id): matches, group_stages = tournament.broadcasted_matches_and_group_stages() live_matches = [match.live_match() for match in matches] - data = json.dumps(live_matches, default=vars) - return HttpResponse(data, content_type='application/json') + live_matches_dicts = [match.live_match().to_dict() for match in matches] + + # data = json.dumps(live_matches, default=vars) + return HttpResponse(live_matches_dicts, content_type='application/json') def tournament_prog_json(request, tournament_id): tournament = get_object_or_404(Tournament, pk=tournament_id)