v0.1.2
Patch release fixing the Add USeg Attribute form. All v0.1.x users
who use uSeg EPGs should upgrade.
Compatibility: NetBox v4.5, NetBox v4.6 · Python 3.12.
Fixed
- "Select a valid choice" on the Add USeg Attribute form (PR #15).
ACIUSegAttributeForm.aci_endpoint_grouprestricted the form's
validation queryset toACIEndpointGroup.objects.filter(is_useg=True),
but NetBox'sDynamicModelChoiceFieldtypeahead fetches candidates
from the REST API, which had nois_usegdefault. Users saw every
EPG in the dropdown, picked one that wasn't uSeg, and the form
rejected the choice on submit. Fixed by adding
query_params={"is_useg": True}to the three affected fields
(ACIUSegAttributeForm,ACIUSegAttributeBulkEditForm,
ACIUSegAttributeFilterForm).
Added
tests/test_form_dropdown_filters.py— regression guard. A pure
static scan that walks everyforms/*.pyand asserts every
DynamicModelChoiceField/DynamicModelMultipleChoiceFieldwith a
filtered queryset (.filter(…)) also passesquery_params={…}. The
check runs in ~15 ms with no DB setup, and the failure message
points the next maintainer at the offending field. Designed to
catch the same class of bug across all future forms.