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.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()