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 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()
|
||||||
|
|
Loading…
Reference in New Issue