From e97b1d165914e98467129b8896ac657a8006c7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Mogu=C3=A9rou?= Date: Mon, 15 May 2023 04:31:32 +0200 Subject: [PATCH] Correction de l'enregistrement de la classe Utilisateur dans les attributs de la classe Session --- app/database.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/database.py b/app/database.py index 307a363..5d288e5 100644 --- a/app/database.py +++ b/app/database.py @@ -60,4 +60,5 @@ class Session: cursor = self.db.db.cursor() cursor.execute("SELECT utilisateurs.user_id, username, nom, prenom, creation_date FROM utilisateurs " "JOIN sessions ON utilisateurs.user_id=sessions.user_id WHERE session_id=%s", (self.uuid,)) - self.user = User(*cursor.fetchall()[0]) \ No newline at end of file + result = cursor.fetchall() + return User(*result[0]) \ No newline at end of file