* Fixes: #15924 - Prevent API payload from allowing tagged_vlans while interface mode is set to taged-all
* Prevent cleanup of tagged_vlans when no tagged_vlans set on interface
* Fix test errors
* Remove accidental debug statements
* Update validation to model clean method instead of serializer
* Remove clearing of tagged vlans from `save()`
* Make changes to validation to account for M2M not being available under model in addition to not being able to check incoming vlans under same model.
* Optimize untagged vlan check
* Re-ordering statements in validators
* Forgot to call super().clean()
* Adjust logic for form and serializer. Add tests
* Fix test failure
* Fix ruff errors
* Fix test by removing now invalid test
* Update serializer, form and tests
* Optimize API test for vlan fields
* Optimize API serializer logic
---------
Co-authored-by: Daniel Sheppard <dans@dansheps.com>
During serialization, custom fields may be available to a model due to
multi-table inheritance, but might not be available in serialized data
because only direct fields of the model are covered. Now this attribute
is only used if available in serialized data. Models using multi-table
inheritance must modify their serialize_object() method to cover parent
serialization.
* Fixes#18585: filtering circuits by location
This also fixes a related issue where selected filter is not shown in
the filter form.
Changes:
- Adds `CircuitFilterSet.location_id` field to enable filtering with
incoming GET params
- Adds `CirciotFilterForm.location_id` field to enable filtering from
list form
- Adds `location_id` to the Location fieldset on `CircuitFilterForm`
* Adds test for new CircuitFilterset.location_id filter
* Fix model URL generator for plugins
* Fix reverse accessor warning
* Revert "Fix reverse accessor warning"
This reverts commit f07642bb99.
* Add URL test case for regular models
* Split dummy models
Instead of using a single model for testing, one is used for testing the
plugin API and a dedicated one is used for testing the NetBox plugin
model features.
* Fix filterset test case error
* Rename test module
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
* Add racktype_count annotation to list view queryset, create the LinkedCountColumn in ManufacturerTable
* Add Manufacturer field to RackTypeFilterForm