Remove all limit_choices_to
attributes on ForeignKey & ManyToMany fields
#17166
Labels
netbox
status: accepted
This issue has been accepted for implementation
type: housekeeping
Changes to the application which do not directly impact the end user
Milestone
Proposed Changes
Remove the
limit_choices_to
attribute on the following model fields:CircuitTermination.termination_type
CircuitGroupAssignment.member_type
CableTermination.termination_type
InventoryItemTemplate.component_type
InventoryItem.component_type
MACAddress.assigned_object_type
IPAddress.assigned_object_type
Prefix.scope_type
VLANGroup.scope_type
ObjectPermission.object_types
Cluster.scope_type
VirtualMachine.role
L2VPNTermination.assigned_object_type
WirelessLAN.scope_type
WirelessLink.interface_a
WirelessLink.interface_b
Justification
The
limit_choices_to
attribute was originally used to limit the selection of related objects for a field within a ModelForm. It is no longer needed as we explicitly declare these fields inside each ModelForm to employ dynamic selections via the REST API.The text was updated successfully, but these errors were encountered: