Skip to content

Commit

Permalink
init db in Flask app context
Browse files Browse the repository at this point in the history
  • Loading branch information
jokester committed Dec 15, 2024
1 parent 9c3ea48 commit 64f6112
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def init_db(app: Flask):

TeamRole.init_system_roles()
ProjectRole.init_system_roles()
Language.init_system_languages()
with app.app_context():
Language.init_system_languages()
SiteSetting.init_site_setting()
admin_user = create_or_override_default_admin(app)
create_default_team(admin_user)

0 comments on commit 64f6112

Please sign in to comment.