diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index 0aa1c188e6..9aeced2462 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -154,7 +154,6 @@ def _user_has_perm(user, perm, obj): def _user_has_module_perms(user, app_label): - active = user.is_active for backend in auth.get_backends(): if hasattr(backend, "has_module_perms"): if backend.has_module_perms(user, app_label):