Upgrade allow adding image in ticket details page comment section
This commit is contained in:
@@ -133,10 +133,23 @@ def create_app(config_name=None):
|
||||
with app.app_context():
|
||||
db.create_all()
|
||||
_seed_admin(app)
|
||||
_seed_settings()
|
||||
|
||||
return app
|
||||
|
||||
|
||||
def _seed_settings():
|
||||
"""Ensure all required system settings exist with safe defaults."""
|
||||
from app.models import SystemSetting
|
||||
defaults = [
|
||||
('registration_enabled', 'true', 'Allow new users to self-register via /auth/register'),
|
||||
]
|
||||
for key, value, description in defaults:
|
||||
if SystemSetting.get(key) is None:
|
||||
SystemSetting.set(key, value, description)
|
||||
db.session.commit()
|
||||
|
||||
|
||||
def _seed_admin(app):
|
||||
"""Create the default admin account if none exists."""
|
||||
from app.models import User, UserRole
|
||||
|
||||
Reference in New Issue
Block a user