elwig-backend: Fix 401 with unknown username

This commit is contained in:
2025-01-05 14:17:48 +01:00
parent 5cb07477f1
commit c3eb15e751

View File

@ -15,7 +15,7 @@ import urllib.parse
import gzip import gzip
VERSION: str = '0.0.2' VERSION: str = '0.0.3'
CNX: sqlite3.Cursor CNX: sqlite3.Cursor
USER_FILE: str USER_FILE: str
@ -541,6 +541,8 @@ class ElwigApi(BaseHTTPRequestHandler):
else: else:
self.error(401, 'Unauthorized') self.error(401, 'Unauthorized')
return None, None return None, None
self.error(401, 'Unauthorized')
return None, None
def exec_collection(self, sql_query: str, fmt: Callable, filters: list[Filter], def exec_collection(self, sql_query: str, fmt: Callable, filters: list[Filter],
offset: int = None, limit: int = None, offset: int = None, limit: int = None,