From cf0b33aa2a12094addb3254107c1bdb2803ebe1d Mon Sep 17 00:00:00 2001 From: Laurent Date: Mon, 28 Jul 2025 15:06:29 +0200 Subject: [PATCH] add more prefetches --- tournaments/views.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tournaments/views.py b/tournaments/views.py index e2081c4..53027ff 100644 --- a/tournaments/views.py +++ b/tournaments/views.py @@ -295,9 +295,19 @@ def tournament(request, tournament_id): .prefetch_related( 'rounds', 'rounds__children', + 'rounds__matches', + 'rounds__matches__team_scores', + 'rounds__matches__team_scores__team_registration', 'rounds__matches__team_scores__team_registration__player_registrations', 'group_stages__matches__team_scores__team_registration__player_registrations', + 'group_stages__matches__team_scores__team_registration', + 'group_stages__matches__team_scores', + 'group_stages__matches', + 'group_stages', 'rounds__children__matches__team_scores__team_registration__player_registrations' + 'rounds__children__matches__team_scores__team_registration' + 'rounds__children__matches__team_scores' + 'rounds__children__matches' ), pk=tournament_id )