Fix database connection to allow multi-threaded access
This commit is contained in:
parent
8cf3344bfe
commit
3a8b10c787
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue