Skip to content

Conversation

@kkthxbye-code
Copy link
Contributor

Fixes: #12639

The code is a tiny bit messy, but I did my best.

Changes:

  • parse_alphanumeric_range now throws a ValidationError when its passed decrementing ranges.
  • The ComponentCreateForm clean method has been slightly reworked to bail out if the name field is not in cleaned_data. Not quite sure what is going on, but I think it's because validation continues even if the above ValidationError is thrown.
  • The tests has been changed to expect an Exception instead of an empty list on decrementing ranges.

Tests passes now, but please give it a test to make sure I didn't mess anything up. The logic for expandable fields is a little hard to grok.

@jeremystretch jeremystretch merged commit 5de9d3f into netbox-community:develop Aug 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add bulk interface validation missing causes server error

2 participants