fix bug in extend_loan function
This commit is contained in:
@@ -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),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user