Fix database connection to allow multi-threaded access

This commit is contained in:
w 2025-07-18 00:24:21 -03:00
parent 8cf3344bfe
commit 3a8b10c787

View file

@ -28,7 +28,7 @@ from werkzeug.exceptions import HTTPException
app = Flask(__name__)
def get_db_connection():
conn = sqlite3.connect(config.DB_PATH)
conn = sqlite3.connect(config.DB_PATH, check_same_thread=False)
conn.row_factory = sqlite3.Row
return conn