Name Format Config error and whitespace stripping.
Created by: TargetZ3R0
In reference to V2-dev branch:
The following error is generated when clicking on Name Format Config in Admin->Services->Name Format Configs as shown here:
https://i.imgur.com/SZ6gVDI.png
Also, please note that the Name Format Config that was supplied is adhered to except all spaces are stripped - so for example
the config shows: [{corp_ticker}] {nickname} Discord would see [{corp_ticker}]{nickname} --> [NZHM.]ShirleyC instead of [NZHM.] Shirley C
This also applies to automatically generated groups on the Discord Server, all spaces are stripped.
Traceback:
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
35. response = get_response(request)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
128. response = self.process_exception_by_middleware(e, request)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
126. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/contrib/admin/options.py" in wrapper
574. return self.admin_site.admin_view(view)(*args, **kwargs)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/utils/decorators.py" in _wrapped_view
142. response = view_func(request, *args, **kwargs)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/contrib/admin/sites.py" in inner
223. return view(request, *args, **kwargs)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/contrib/admin/options.py" in change_view
1556. return self.changeform_view(request, object_id, form_url, extra_context)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/utils/decorators.py" in _wrapper
62. return bound_func(*args, **kwargs)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/utils/decorators.py" in _wrapped_view
142. response = view_func(request, *args, **kwargs)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/utils/decorators.py" in bound_func
58. return func.__get__(self, type(self))(*args2, **kwargs2)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/contrib/admin/options.py" in changeform_view
1450. return self._changeform_view(request, object_id, form_url, extra_context)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/django/contrib/admin/options.py" in _changeform_view
1507. form = ModelForm(instance=obj)
File "/home/badfellas/venv/auth/lib/python3.5/site-packages/allianceauth/services/admin.py" in __init__
12. SERVICE_CHOICES.append((self.instance.field, self.instance.field))
Exception Type: AttributeError at /admin/services/nameformatconfig/6/change/
Exception Value: 'NameFormatConfig' object has no attribute 'field'