Refactor UI and remove unused tests

- Deleted the generated UI file `untitled_ui.py` as it is no longer needed.
- Updated `search_statistic_page.ui` to enhance table properties, including grid style and sort indicators.
- Modified `search_statistic_page_ui.py` to reflect changes in the UI file and improve table header settings.
- Improved cleanup logic in `richtext.py` to ensure files are only deleted if they exist.
- Adjusted spacing in document generation for better formatting.
- Removed obsolete test files: `database_test.py`, `many_webrequest_test.py`, `test_database.py`, and `webrequest_test.py` to clean up the test suite.
This commit is contained in:
2025-05-12 15:26:58 +02:00
parent d71de1bd1a
commit 8f90247e98
30 changed files with 79 additions and 2672 deletions

View File

@@ -196,6 +196,7 @@ class Database:
if "INTO user" in query:
log_message = f"Querying database with query {query}"
# logger.debug(f"DB Query: {log_message}")
log.debug(log_message)
try:
cursor.execute(query, args)
rv = cursor.fetchall()
@@ -996,6 +997,10 @@ class Database:
"UPDATE semesterapparat SET deletion_status=1, deleted_date=? WHERE appnr=?",
(semester, app_id),
)
self.query_db(
"UPDATE media SET deleted=1 WHERE app_id=?",
(app_id,),
)
def isEternal(self, id):
"""check if the apparat is eternal (dauerapparat)
@@ -1020,11 +1025,14 @@ class Database:
Returns:
str: the name of the apparat
"""
return self.query_db(
result = self.query_db(
"SELECT name FROM semesterapparat WHERE appnr=? AND prof_id=?",
(app_id, prof_id),
one=True,
)[0]
)
if result:
return result[0]
return None
def updateApparat(self, apparat_data: ApparatData):
"""Update an apparat in the database