Ajout du destructeur de la classe Database

This commit is contained in:
Valentin Moguérou 2023-05-15 17:01:46 +02:00
parent 2741e3ae5e
commit 792b3fca33

View File

@ -39,6 +39,9 @@ class Database:
result = cursor.fetchall() result = cursor.fetchall()
cursor.close() cursor.close()
return result return result
def __del__(self):
self.db.close()
class User: class User:
def __init__(self, user_id, username, nom, prenom, creation_date): def __init__(self, user_id, username, nom, prenom, creation_date):