You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Received the error when trying to create a new custom field:
18:45:00.307 ERROR django.request :
Internal Server Error: /admin/extras/customfield/add/
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 171, in _get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/opt/nautobot/.local/lib/python3.9/site-packages/welcome_wizard/middleware.py", line 34, in process_view
base_fields = view_func.view_class.model_form.base_fields
AttributeError: 'function' object has no attribute 'view_class'
[pid: 45|app: 0|req: 193/923] 172.26.0.7 () {60 vars in 1393 bytes} [Mon Aug 30 18:45:00 2021] GET /admin/extras/customfield/add/ => generated 1846 bytes in 7 msecs (HTTP/1.0 500) 6 headers in 214 bytes (1 switches on core 0)
Steps to Reproduce
Install Welcome Wizard Plugin
Go to admin panel
Select Custom Fields
Select create custom field
Receive the error
The text was updated successfully, but these errors were encountered:
smk4664
changed the title
Unable to Create Custom Field Due to AttributeError: 'function' object has no attribute 'view_class'
Unable to add an object to a model in Django Admin view
Aug 30, 2021
The middleware currently looks for /add/ in the request path, to find the associated model_fields. This code is expecting the request path to be for a Nautobot form, not a Django Admin form. I will have a fix coming soon.
Environment
Expected Behavior
Able to create a custom field
Observed Behavior
Received the error when trying to create a new custom field:
Steps to Reproduce
The text was updated successfully, but these errors were encountered: