add more prefetches

apikeys
Laurent 3 months ago
parent a1becd8455
commit cf0b33aa2a
  1. 10
      tournaments/views.py

@ -295,9 +295,19 @@ def tournament(request, tournament_id):
.prefetch_related( .prefetch_related(
'rounds', 'rounds',
'rounds__children', 'rounds__children',
'rounds__matches',
'rounds__matches__team_scores',
'rounds__matches__team_scores__team_registration',
'rounds__matches__team_scores__team_registration__player_registrations', 'rounds__matches__team_scores__team_registration__player_registrations',
'group_stages__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__player_registrations'
'rounds__children__matches__team_scores__team_registration'
'rounds__children__matches__team_scores'
'rounds__children__matches'
), ),
pk=tournament_id pk=tournament_id
) )

Loading…
Cancel
Save