From ac32b86b175d3a057e1f9ae64f007472402a3d72 Mon Sep 17 00:00:00 2001 From: WorldTeacher Date: Mon, 7 Apr 2025 07:53:36 +0200 Subject: [PATCH] fix bug in extend_loan function --- src/backend/database.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/database.py b/src/backend/database.py index de43c0c..16c13a9 100644 --- a/src/backend/database.py +++ b/src/backend/database.py @@ -47,6 +47,7 @@ class Database: if db_path is None: self.db_path = self.database.path + self.database.name self.db_path = self.db_path.replace("~", str(Path.home())) + logger.debug(self.db_path) else: self.db_path = db_path self.checkDatabaseStatus() @@ -54,7 +55,6 @@ class Database: def checkDatabaseStatus(self): path = self.database.path path = path.replace("~", str(Path.home())) - # print(path) path = os.path.abspath(path) if not os.path.exists(path): # create path @@ -181,7 +181,7 @@ class Database: # log_message = f"Querying database with query {query}" if "INTO user" in query: log_message = f"Querying database with query {query}" - logger.debug(log_message) + logger.debug(f"DB Query: {log_message}") try: cursor.execute(query, args) rv = cursor.fetchall() @@ -816,7 +816,7 @@ class Database: ) else: self.query_db( - "UPDATE semesterapparat SET verlängerung_bis=?, verlängerung_am=? WHERE appnr=?", + "UPDATE semesterapparat SET verlängerung_bis=?, verlängert_am=? WHERE appnr=?", (newDate, today, app_id), )