Merge dev to main, nearing completion #6
@@ -47,6 +47,7 @@ class Database:
|
|||||||
if db_path is None:
|
if db_path is None:
|
||||||
self.db_path = self.database.path + self.database.name
|
self.db_path = self.database.path + self.database.name
|
||||||
self.db_path = self.db_path.replace("~", str(Path.home()))
|
self.db_path = self.db_path.replace("~", str(Path.home()))
|
||||||
|
logger.debug(self.db_path)
|
||||||
else:
|
else:
|
||||||
self.db_path = db_path
|
self.db_path = db_path
|
||||||
self.checkDatabaseStatus()
|
self.checkDatabaseStatus()
|
||||||
@@ -54,7 +55,6 @@ class Database:
|
|||||||
def checkDatabaseStatus(self):
|
def checkDatabaseStatus(self):
|
||||||
path = self.database.path
|
path = self.database.path
|
||||||
path = path.replace("~", str(Path.home()))
|
path = path.replace("~", str(Path.home()))
|
||||||
# print(path)
|
|
||||||
path = os.path.abspath(path)
|
path = os.path.abspath(path)
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
# create path
|
# create path
|
||||||
@@ -181,7 +181,7 @@ class Database:
|
|||||||
# log_message = f"Querying database with query {query}"
|
# log_message = f"Querying database with query {query}"
|
||||||
if "INTO user" in query:
|
if "INTO user" in query:
|
||||||
log_message = f"Querying database with query {query}"
|
log_message = f"Querying database with query {query}"
|
||||||
logger.debug(log_message)
|
logger.debug(f"DB Query: {log_message}")
|
||||||
try:
|
try:
|
||||||
cursor.execute(query, args)
|
cursor.execute(query, args)
|
||||||
rv = cursor.fetchall()
|
rv = cursor.fetchall()
|
||||||
@@ -816,7 +816,7 @@ class Database:
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.query_db(
|
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),
|
(newDate, today, app_id),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user