fixed migrations

This commit is contained in:
2025-06-02 16:11:56 +02:00
parent c95a1c456b
commit 4dbaa27cba
98 changed files with 399 additions and 109 deletions

View File

@@ -7,13 +7,6 @@ from utils import log_event, create_notification, get_unread_count
auth_bp = Blueprint('auth', __name__)
@auth_bp.context_processor
def inject_unread_notifications():
if current_user.is_authenticated:
unread_count = get_unread_count(current_user.id)
return {'unread_notifications': unread_count}
return {'unread_notifications': 0}
def require_password_change(f):
@wraps(f)
def decorated_function(*args, **kwargs):
@@ -24,6 +17,13 @@ def require_password_change(f):
return decorated_function
def init_routes(auth_bp):
@auth_bp.context_processor
def inject_unread_notifications():
if current_user.is_authenticated:
unread_count = get_unread_count(current_user.id)
return {'unread_notifications': unread_count}
return {'unread_notifications': 0}
@auth_bp.route('/login', methods=['GET', 'POST'])
def login():
if current_user.is_authenticated: