refactor create_app function to improve database initialization logic
All checks were successful
Build and Push Image / build-and-push (push) Successful in 15s
All checks were successful
Build and Push Image / build-and-push (push) Successful in 15s
This commit is contained in:
parent
7209d3fed0
commit
73227d5a6c
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ def create_app():
|
|||
db_dir = os.path.dirname(db_file_path)
|
||||
if db_dir and not os.path.exists(db_dir):
|
||||
os.makedirs(db_dir, exist_ok=True)
|
||||
|
||||
|
||||
db.create_all()
|
||||
|
||||
return app
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue