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

@ -40,6 +40,9 @@ class Database:
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):
self.id = user_id self.id = user_id