Fix tournament prefetch related in GSheet notifications

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-04-07 00:21:20 +02:00
parent 29d9432ca2
commit 188b83ce2d
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 1 additions and 1 deletions

View File

@ -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()