mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-26 07:42:26 +00:00
Fix tournament prefetch related in GSheet notifications
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
29d9432ca2
commit
188b83ce2d
@ -1885,7 +1885,7 @@ class GSheetNotificationsView(View):
|
|||||||
if not await Tournament.objects.filter(pk=kwargs['pk']).aexists():
|
if not await Tournament.objects.filter(pk=kwargs['pk']).aexists():
|
||||||
return HttpResponse(status=404)
|
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()) \
|
expected_channel_id = sha1(f"{tournament.name}-{timezone.now().date()}-{request.site.domain}".encode()) \
|
||||||
.hexdigest()
|
.hexdigest()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user