updates
This commit is contained in:
@@ -148,8 +148,8 @@ class Database:
|
||||
conn = self.connect()
|
||||
cursor = conn.cursor()
|
||||
log_message = f"Querying database with query {query}, args: {args}"
|
||||
if "INSERT" in query:
|
||||
log_message = f"Querying database with query {query}"
|
||||
# if "INSERT" in query:
|
||||
# log_message = f"Querying database with query {query}"
|
||||
|
||||
self.logger.log_info(log_message)
|
||||
|
||||
@@ -661,7 +661,10 @@ class Database:
|
||||
|
||||
data = self.getProfByName(prof_name.replace(",", ""))
|
||||
if data is None:
|
||||
return None
|
||||
# get last used id and return id + 1
|
||||
profno = self.query_db("SELECT id FROM prof ORDER BY id DESC", one=True)[0]
|
||||
return profno + 1
|
||||
# return None
|
||||
else:
|
||||
return data[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user