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
In NAV 4.8, when attempting to submit a new threshold rule in the Treshold tool, if the target field is left empty, the page crashes with a KeyError instead of simply reporting an invalid form submission:
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
111. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/source/python/nav/web/threshold/views.py" in add_threshold
56. if form.is_valid():
File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in is_valid
162. return self.is_bound and not bool(self.errors)
File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in errors
154. self.full_clean()
File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in full_clean
353. self._clean_fields()
File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in _clean_fields
371. value = getattr(self, 'clean_%s' % name)()
File "/source/python/nav/web/threshold/forms.py" in clean_alert
100. validate_expression(alert, self)
File "/source/python/nav/web/threshold/forms.py" in validate_expression
121. target = form.cleaned_data['target']
Exception Type: KeyError at /threshold/add
Exception Value: 'target'
The text was updated successfully, but these errors were encountered:
In NAV 4.8, when attempting to submit a new threshold rule in the Treshold tool, if the target field is left empty, the page crashes with a
KeyError
instead of simply reporting an invalid form submission:Traceback: File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 111. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/source/python/nav/web/threshold/views.py" in add_threshold 56. if form.is_valid(): File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in is_valid 162. return self.is_bound and not bool(self.errors) File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in errors 154. self.full_clean() File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in full_clean 353. self._clean_fields() File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py" in _clean_fields 371. value = getattr(self, 'clean_%s' % name)() File "/source/python/nav/web/threshold/forms.py" in clean_alert 100. validate_expression(alert, self) File "/source/python/nav/web/threshold/forms.py" in validate_expression 121. target = form.cleaned_data['target'] Exception Type: KeyError at /threshold/add Exception Value: 'target'
The text was updated successfully, but these errors were encountered: