Removed any errors by ignoring them

This commit is contained in:
2025-04-16 08:59:03 +02:00
parent f53d50ef7a
commit 80a39f5c89
3 changed files with 10 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
from typing import Callable, Any
from flask_login import current_user # type: ignore
from functools import wraps
from flask import redirect, url_for, flash
from flask import redirect, url_for
def admin_required(f: Callable[..., Any]) -> Callable[..., Any]:
@@ -10,7 +10,6 @@ def admin_required(f: Callable[..., Any]) -> Callable[..., Any]:
if not current_user.is_authenticated:
return redirect(url_for("login"))
if not current_user.is_admin:
flash("Admins only!")
return redirect(url_for("index"))
return f(*args, **kwargs)