Refs -- Removed force_bytes() usage in contrib/auth/handlers/modwsgi.py.
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()
