Fetch registrations by user id

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-04-06 19:12:10 +02:00
parent ceedd0678c
commit 78a43148a8
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
# Fetch the registration of the current user # Fetch the registration of the current user
user = self.scope['user'] user = self.scope['user']
reg = await Registration.objects.aget(user=user) reg = await Registration.objects.aget(user_id=user.id)
self.registration = reg self.registration = reg
# Accept the connection # Accept the connection