From 188b83ce2d69b17ffe48db50343141b020d44b58 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Sun, 7 Apr 2024 00:21:20 +0200 Subject: [PATCH] Fix tournament prefetch related in GSheet notifications Signed-off-by: Emmy D'Anello --- participation/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/participation/views.py b/participation/views.py index 18ffacf..e7ed4ef 100644 --- a/participation/views.py +++ b/participation/views.py @@ -1885,7 +1885,7 @@ class GSheetNotificationsView(View): if not await Tournament.objects.filter(pk=kwargs['pk']).aexists(): return HttpResponse(status=404) - tournament = await Tournament.objects.prefetch_related('participations', 'pools').aget(pk=kwargs['pk']) + tournament = await Tournament.objects.prefetch_related('participation_set', 'pools').aget(pk=kwargs['pk']) expected_channel_id = sha1(f"{tournament.name}-{timezone.now().date()}-{request.site.domain}".encode()) \ .hexdigest()