Able to successfully view a rule object.
When trying to view a DVE rule (Min/Max, Regex, Required, Unique), a Validation Error is returned.
For example, when trying to click & view a Min/Max Rule called "Max VLAN ID", the following error is returned:
Environment:
Request Method: GET
Request URL: http://localhost:8080/plugins/nautobot-data-validation-engine/min-max-rules/max-vlan-id
Django Version: 3.2.18
Python Version: 3.8.17
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'corsheaders',
'django_filters',
'django_jinja',
'django_tables2',
'django_prometheus',
'social_django',
'taggit',
'timezone_field',
'nautobot.core.apps.NautobotConstanceConfig',
'nautobot.core',
'django.contrib.admin',
'django_celery_beat',
'django_celery_results',
'rest_framework',
'db_file_storage',
'nautobot.circuits',
'nautobot.dcim',
'nautobot.ipam',
'nautobot.extras',
'nautobot.tenancy',
'nautobot.users',
'nautobot.virtualization',
'drf_spectacular',
'drf_spectacular_sidecar',
'graphene_django',
'health_check',
'health_check.storage',
'django_extensions',
'constance.backends.database',
'django_ajax_tables',
'debug_toolbar',
'nautobot_data_validation_engine.NautobotDataValidationEngineConfig']
Installed Middleware:
['debug_toolbar.middleware.DebugToolbarMiddleware',
'django_prometheus.middleware.PrometheusBeforeMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'nautobot.core.middleware.ExceptionHandlingMiddleware',
'nautobot.core.middleware.RemoteUserMiddleware',
'nautobot.core.middleware.ExternalAuthMiddleware',
'nautobot.core.middleware.ObjectChangeMiddleware',
'django_prometheus.middleware.PrometheusAfterMiddleware']
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/__init__.py", line 2434, in to_python
return uuid.UUID(**{input_form: value})
File "/usr/local/lib/python3.8/uuid.py", line 171, in __init__
raise ValueError('badly formed hexadecimal UUID string')
During handling of the above exception (badly formed hexadecimal UUID string), another exception occurred:
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/rest_framework/viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/nautobot/core/views/mixins.py", line 297, in dispatch
return super().dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/nautobot/core/views/mixins.py", line 585, in retrieve
instance = self.get_object()
File "/usr/local/lib/python3.8/site-packages/nautobot/core/views/mixins.py", line 453, in get_object
obj = get_object_or_404(queryset, **filter_kwargs)
File "/usr/local/lib/python3.8/site-packages/django/shortcuts.py", line 76, in get_object_or_404
return queryset.get(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 424, in get
clone = self._chain() if self.query.combinator else self.filter(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/nautobot/core/models/querysets.py", line 115, in filter
return super().filter(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 941, in filter
return self._filter_or_exclude(False, args, kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 961, in _filter_or_exclude
clone._filter_or_exclude_inplace(negate, args, kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 968, in _filter_or_exclude_inplace
self._query.add_q(Q(*args, **kwargs))
File "/usr/local/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1416, in add_q
clause, _ = self._add_q(q_object, self.used_aliases)
File "/usr/local/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1435, in _add_q
child_clause, needed_inner = self.build_filter(
File "/usr/local/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1370, in build_filter
condition = self.build_lookup(lookups, col, value)
File "/usr/local/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1216, in build_lookup
lookup = lookup_class(lhs, rhs)
File "/usr/local/lib/python3.8/site-packages/django/db/models/lookups.py", line 25, in __init__
self.rhs = self.get_prep_lookup()
File "/usr/local/lib/python3.8/site-packages/django/db/models/lookups.py", line 77, in get_prep_lookup
return self.lhs.output_field.get_prep_value(self.rhs)
File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/__init__.py", line 2418, in get_prep_value
return self.to_python(value)
File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/__init__.py", line 2436, in to_python
raise exceptions.ValidationError(
Exception Type: ValidationError at /plugins/nautobot-data-validation-engine/min-max-rules/max-vlan-id
Exception Value: ['“max-vlan-id” is not a valid UUID.']