From 8d8735035637805201eb8242dfa86ee0cfe9776a Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Wed, 26 Sep 2018 08:16:59 -0700 Subject: [PATCH] Refs #27795 -- Removed force_bytes() usage in contrib/auth/handlers/modwsgi.py. --- django/contrib/auth/handlers/modwsgi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/django/contrib/auth/handlers/modwsgi.py b/django/contrib/auth/handlers/modwsgi.py index 198d9c0139..591ec72cb4 100644 --- a/django/contrib/auth/handlers/modwsgi.py +++ b/django/contrib/auth/handlers/modwsgi.py @@ -1,6 +1,5 @@ from django import db from django.contrib import auth -from django.utils.encoding import force_bytes UserModel = auth.get_user_model() @@ -39,6 +38,6 @@ def groups_for_user(environ, username): return [] if not user.is_active: return [] - return [force_bytes(group.name) for group in user.groups.all()] + return [group.name.encode() for group in user.groups.all()] finally: db.close_old_connections()