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