small bugfix based on changed structure

This commit is contained in:
WorldTeacher
2024-05-21 13:20:45 +02:00
parent fd1a7c8275
commit 0de3cb3487

View File

@@ -723,15 +723,16 @@ class Database:
newDate (str): the new date
dauerapp (bool, optional): if the apparat was changed to dauerapparat. Defaults to False.
"""
date = datetime.datetime.strptime(newDate, "%d.%m.%Y").strftime("%Y-%m-%d")
if dauerapp:
self.query_db(
"UPDATE semesterapparat SET verlängerung_bis=?, dauerapp=? WHERE appnr=?",
(date, dauerapp, app_id),
(newDate, dauerapp, app_id),
)
else:
self.query_db(
"UPDATE semesterapparat SET endsemester=? WHERE appnr=?", (date, app_id)
"UPDATE semesterapparat SET verlängerung_bis=? WHERE appnr=?",
(newDate, app_id),
)
def getApparatId(self, apparat_name) -> Optional[int]: