Manually adding an account request without approving is fine. After approving:
Internal Server Error: /admin/accounts/accountrequest/2020/change/
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
response = self._get_response(request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, callback_kwargs)
File "/usr/lib/python2.7/site-packages/django/contrib/admin/options.py", line 552, in wrapper
return self.admin_site.admin_view(view)(*args, *kwargs)
File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 149, in _wrapped_view
response = view_func(request, args, kwargs)
File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
response = view_func(request, *args, kwargs)
File "/usr/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 224, in inner
return view(request, *args, *kwargs)
File "/usr/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1512, in change_view
return self.changeform_view(request, object_id, form_url, extra_context)
File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 67, in _wrapper
return bound_func(args, kwargs)
File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 149, in _wrapped_view
response = view_func(request, *args, kwargs)
File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 63, in bound_func
return func.get(self, type(self))(*args2, *kwargs2)
File "/usr/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1409, in changeform_view
return self._changeform_view(request, object_id, form_url, extra_context)
File "/usr/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1449, in _changeform_view
self.save_model(request, new_object, form, not add)
File "/usr/lib/python2.7/site-packages/django/contrib/admin/options.py", line 980, in save_model
obj.save()
File "./accounts/models.py", line 111, in save
role=self.role
File "./accounts/models.py", line 235, in create_user_from_request
cu_user = CuLdapUser.objects.get(username=username)
File "/usr/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(args, kwargs)
File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 374, in get
num = len(clone)
File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 232, in len
self._fetch_all()
File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 1121, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 62, in iter
for row in compiler.results_iter(results):
File "/usr/lib/python2.7/site-packages/django_ldapdb-1.4.1.dev0-py2.7.egg/ldapdb/backends/ldap/compiler.py", line 228, in results_iter
for dn, attrs in vals:
File "/usr/lib/python2.7/site-packages/django_ldapdb-1.4.1.dev0-py2.7.egg/ldapdb/backends/ldap/base.py", line 356, in search_s
timeout=query_timeout,
File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 833, in search_ext
for a in attrlist)
File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 833, in
for a in attrlist)
File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 179, in _bytesify_input
"got type '{}' for '{}'.".format(type(value).name, arg_name)
TypeError: All provided fields must be text when bytes mode is off; got type 'str' for 'attrlist'.
Manually adding an account request without approving is fine. After approving:
Internal Server Error: /admin/accounts/accountrequest/2020/change/ Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response response = self._get_response(request) File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, callback_kwargs) File "/usr/lib/python2.7/site-packages/django/contrib/admin/options.py", line 552, in wrapper return self.admin_site.admin_view(view)(*args, *kwargs) File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 149, in _wrapped_view response = view_func(request, args, kwargs) File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func response = view_func(request, *args, kwargs) File "/usr/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 224, in inner return view(request, *args, *kwargs) File "/usr/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1512, in change_view return self.changeform_view(request, object_id, form_url, extra_context) File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 67, in _wrapper return bound_func(args, kwargs) File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 149, in _wrapped_view response = view_func(request, *args, kwargs) File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 63, in bound_func return func.get(self, type(self))(*args2, *kwargs2) File "/usr/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1409, in changeform_view return self._changeform_view(request, object_id, form_url, extra_context) File "/usr/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1449, in _changeform_view self.save_model(request, new_object, form, not add) File "/usr/lib/python2.7/site-packages/django/contrib/admin/options.py", line 980, in save_model obj.save() File "./accounts/models.py", line 111, in save role=self.role File "./accounts/models.py", line 235, in create_user_from_request cu_user = CuLdapUser.objects.get(username=username) File "/usr/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method return getattr(self.get_queryset(), name)(args, kwargs) File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 374, in get num = len(clone) File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 232, in len self._fetch_all() File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 1121, in _fetch_all self._result_cache = list(self._iterable_class(self)) File "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 62, in iter for row in compiler.results_iter(results): File "/usr/lib/python2.7/site-packages/django_ldapdb-1.4.1.dev0-py2.7.egg/ldapdb/backends/ldap/compiler.py", line 228, in results_iter for dn, attrs in vals: File "/usr/lib/python2.7/site-packages/django_ldapdb-1.4.1.dev0-py2.7.egg/ldapdb/backends/ldap/base.py", line 356, in search_s timeout=query_timeout, File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 833, in search_ext for a in attrlist) File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 833, in
for a in attrlist)
File "/usr/lib64/python2.7/site-packages/ldap/ldapobject.py", line 179, in _bytesify_input
"got type '{}' for '{}'.".format(type(value).name, arg_name)
TypeError: All provided fields must be text when bytes mode is off; got type 'str' for 'attrlist'.