summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/contrib/auth/handlers/modwsgi.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/django/contrib/auth/handlers/modwsgi.py b/django/contrib/auth/handlers/modwsgi.py
index a26d6219dd..df20f1283a 100644
--- a/django/contrib/auth/handlers/modwsgi.py
+++ b/django/contrib/auth/handlers/modwsgi.py
@@ -40,11 +40,7 @@ def groups_for_user(environ, username):
user = UserModel._default_manager.get_by_natural_key(username)
except UserModel.DoesNotExist:
return []
- try:
- if not user.is_active:
- return []
- except AttributeError as e:
- # a custom user may not support is_active
+ if not user.is_active:
return []
return [force_bytes(group.name) for group in user.groups.all()]
finally: