From 78a43148a84faac198bee8cef8f404e53a3a3ca1 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Sat, 6 Apr 2024 19:12:10 +0200 Subject: [PATCH] Fetch registrations by user id Signed-off-by: Emmy D'Anello --- draw/consumers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draw/consumers.py b/draw/consumers.py index 2096c37..a3f091a 100644 --- a/draw/consumers.py +++ b/draw/consumers.py @@ -47,7 +47,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer): # Fetch the registration of the current user user = self.scope['user'] - reg = await Registration.objects.aget(user=user) + reg = await Registration.objects.aget(user_id=user.id) self.registration = reg # Accept the connection