Skip to content

Commit

Permalink
Closes #10529: Run validation on each value of a multi-value filter
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Sep 30, 2022
1 parent d486fa8 commit ada5c58
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions netbox/utilities/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ def to_python(self, value):
field.to_python(v) for v in value if v
]

def run_validators(self, value):
for v in value:
super().run_validators(v)

def validate(self, value):
for v in value:
super().validate(v)

return type('MultiValue{}'.format(field_class.__name__), (NewField,), dict())


Expand Down

0 comments on commit ada5c58

Please sign in to comment.