Refs #27795 -- Removed force_bytes() usage in contrib/auth/handlers/modwsgi.py.

This commit is contained in:
Jon Dufresne 2018-09-26 08:16:59 -07:00 committed by Tim Graham
parent 90d93a1b42
commit 8d87350356
1 changed files with 1 additions and 2 deletions

View File

@ -1,6 +1,5 @@
from django import db from django import db
from django.contrib import auth from django.contrib import auth
from django.utils.encoding import force_bytes
UserModel = auth.get_user_model() UserModel = auth.get_user_model()
@ -39,6 +38,6 @@ def groups_for_user(environ, username):
return [] return []
if not user.is_active: if not user.is_active:
return [] return []
return [force_bytes(group.name) for group in user.groups.all()] return [group.name.encode() for group in user.groups.all()]
finally: finally:
db.close_old_connections() db.close_old_connections()