Bug creating non ldap user
Is this misguided? With the local ldap server, should we enforce ldap only users?
Environment:
Request Method: POST
Request URL: http://binfo06.iric.ca:8000/secure/admin/users/create/
Django Version: 2.0.13
Python Version: 3.6.7
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.postgres',
'crispy_forms',
'chartjs',
'private_storage',
'portal']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/u/seguinj/repos/iric-data/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
35. response = get_response(request)
File "/u/seguinj/repos/iric-data/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
128. response = self.process_exception_by_middleware(e, request)
File "/u/seguinj/repos/iric-data/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
126. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/u/seguinj/repos/iric-data/lib/python3.6/site-packages/django/views/generic/base.py" in view
69. return self.dispatch(request, *args, **kwargs)
File "/u/seguinj/repos/iric-data/lib/python3.6/site-packages/django/contrib/auth/mixins.py" in dispatch
109. return super().dispatch(request, *args, **kwargs)
File "/u/seguinj/repos/iric-data/lib/python3.6/site-packages/django/views/generic/base.py" in dispatch
89. return handler(request, *args, **kwargs)
File "/u/seguinj/repos/iric-data/lib/python3.6/site-packages/django/views/generic/edit.py" in post
172. return super().post(request, *args, **kwargs)
File "/u/seguinj/repos/iric-data/lib/python3.6/site-packages/django/views/generic/edit.py" in post
142. return self.form_valid(form)
File "/u/seguinj/repos/iric-data/iric-data/portal/views/secure/user_profile.py" in form_valid
99. ldap_username = profile_form.cleaned_data['accountname']
Exception Type: KeyError at /secure/admin/users/create/
Exception Value: 'accountname'
Edited by Jonathan Séguin