flake8
This commit is contained in:
@@ -23,4 +23,4 @@ class AdminRequiredMiddleware(object):
|
||||
path = request.path_info
|
||||
if path.startswith("/admin/") or path.startswith("/api/admin/"):
|
||||
if not(request.user.is_authenticated() and request.user.is_admin()):
|
||||
return JSONResponse.response({"error": "login-required", "data": _("Please login in first")})
|
||||
return JSONResponse.response({"error": "login-required", "data": _("Please login in first")})
|
||||
|
||||
Reference in New Issue
Block a user