Refs #27795 -- Removed force_bytes() usage in contrib/auth/handlers/modwsgi.py.
This commit is contained in:
parent
90d93a1b42
commit
8d87350356
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue