diff --git a/netbox/users/forms/model_forms.py b/netbox/users/forms/model_forms.py index 99320fa25c..aa5811cd15 100644 --- a/netbox/users/forms/model_forms.py +++ b/netbox/users/forms/model_forms.py @@ -385,7 +385,7 @@ def clean(self): CONSTRAINT_TOKEN_USER: 0, # Replace token with a null user ID } model.objects.filter(qs_filter_from_constraints(constraints, tokens)).exists() - except FieldError as e: + except (FieldError, ValueError) as e: raise forms.ValidationError({ 'constraints': _('Invalid filter for {model}: {error}').format(model=model, error=e) })