From 792b3fca33a9a9a0651d9e7ebf0a72ea90b2a004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Mogu=C3=A9rou?= Date: Mon, 15 May 2023 17:01:46 +0200 Subject: [PATCH] Ajout du destructeur de la classe Database --- app/database.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/database.py b/app/database.py index 90c9818..a706d41 100644 --- a/app/database.py +++ b/app/database.py @@ -39,6 +39,9 @@ class Database: result = cursor.fetchall() cursor.close() return result + + def __del__(self): + self.db.close() class User: def __init__(self, user_id, username, nom, prenom, creation_date):