From 63125e8fd91bd8af8f4fe1b71233df7de8f0e580 Mon Sep 17 00:00:00 2001 From: Jashon Osala Date: Tue, 12 Sep 2023 17:32:51 +0300 Subject: [PATCH] chore: Apply fix from #80 user settings table creation. --- source/docq/manage_settings.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/docq/manage_settings.py b/source/docq/manage_settings.py index aa0155a0..4d08a968 100644 --- a/source/docq/manage_settings.py +++ b/source/docq/manage_settings.py @@ -40,8 +40,7 @@ def _get_sqlite_file(user_id: int = None) -> str: def _get_settings(user_id: int = None) -> dict: log.debug("Getting settings for user %s", str(user_id)) with closing( - # sqlite3.connect(_get_sqlite_file(user_id), detect_types=sqlite3.PARSE_DECLTYPES) - sqlite3.connect(_get_sqlite_file(), detect_types=sqlite3.PARSE_DECLTYPES) # FIXME: fix sqlite3.OperationalError: no such table: settings if user_id is not None + sqlite3.connect(_get_sqlite_file(user_id), detect_types=sqlite3.PARSE_DECLTYPES) ) as connection, closing(connection.cursor()) as cursor: id_ = user_id or USER_ID_AS_SYSTEM rows = cursor.execute(