Commit 5569652d authored by MOREAU Ulysse's avatar MOREAU Ulysse
Browse files

Order middlewares correctly

parent 95d24358
......@@ -10,7 +10,7 @@ class ReadOnVisit(MiddlewareMixin):
# Do not mark notification as read
# if the visiting user is an admin
# impersonating a user.
if getattr(request.user, "is_impersonate", False):
if request.user.is_impersonate:
return
notifications = models.Notification.objects.filter(
......
......@@ -68,8 +68,8 @@ MIDDLEWARE = (
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"django.middleware.security.SecurityMiddleware",
"notifications.middleware.ReadOnVisit",
"impersonate.middleware.ImpersonateMiddleware",
"notifications.middleware.ReadOnVisit",
)
ROOT_URLCONF = "site_des_eleves.urls"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment