From d9fcdf95cb17a2c34b336673f304f0a5ca558bff Mon Sep 17 00:00:00 2001 From: Laurent Date: Sat, 8 Mar 2025 08:50:47 +0100 Subject: [PATCH] Fix prog broadcast --- tournaments/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tournaments/views.py b/tournaments/views.py index 159c169..5a37c26 100644 --- a/tournaments/views.py +++ b/tournaments/views.py @@ -357,10 +357,8 @@ def broadcast_json(request, tournament_id): def tournament_matches_json(request, tournament_id): tournament = get_object_or_404(Tournament, pk=tournament_id) matches, group_stages = tournament.broadcasted_matches_and_group_stages() - live_matches = [match.live_match() for match in matches] live_matches_dicts = [match.live_match().to_dict() for match in matches] - data = json.dumps(live_matches_dicts, default=vars) return HttpResponse(data, content_type='application/json') @@ -376,7 +374,8 @@ def tournament_prog_json(request, tournament_id): else: live_matches.append(match.live_match()) - data = json.dumps(live_matches, default=vars) + live_matches_dicts = [match.to_dict() for match in live_matches] + data = json.dumps(live_matches_dicts, default=vars) return HttpResponse(data, content_type='application/json') def tournament_group_stages(request, tournament_id):