netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.79k stars 2.54k forks source link

Remove all `limit_choices_to` attributes on ForeignKey & ManyToMany fields #17166

Open jeremystretch opened 1 month ago

jeremystretch commented 1 month ago

Proposed Changes

Remove the limit_choices_to attribute on the following model fields:

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.

jeremystretch commented 1 month ago

Blocked by #10136