fix issues #20 and #29: init the db after registering all the routes

main
nobohan 1 year ago
parent 44c937275a
commit 2e0c7e897e

@ -92,9 +92,6 @@ def get_app(config, _app=None, with_external_mods=True, url_prefix="/api"):
with app.app_context():
create_schemas(db)
db.create_all()
populate_modules(db)
from gncitizen.core.users.routes import users_api
from gncitizen.core.commons.routes import commons_api
@ -136,6 +133,8 @@ def get_app(config, _app=None, with_external_mods=True, url_prefix="/api"):
# _app = app
create_schemas(db)
db.create_all()
populate_modules(db)
return app

Loading…
Cancel
Save