Skip to content

Commit

Permalink
Closes #15099: Remove legacy device_role & device_role_id filters for…
Browse files Browse the repository at this point in the history
… devices
  • Loading branch information
jeremystretch committed Feb 9, 2024
1 parent 64039a8 commit d8c6dad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
5 changes: 5 additions & 0 deletions docs/release-notes/version-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## v4.0.0 (FUTURE)

### Breaking Changes

* The deprecated `device_role` & `device_role_id` filters for devices have been removed. (Use `role` and `role_id` instead.)

### New Features

#### Complete UI Refresh ([#12128](https://github.com/netbox-community/netbox/issues/12128))
Expand All @@ -26,3 +30,4 @@ The NetBox user interface has been completely refreshed and updated.
* [#14657](https://github.com/netbox-community/netbox/issues/14657) - Remove backward compatibility for old permissions mapping under `ActionsMixin`
* [#14658](https://github.com/netbox-community/netbox/issues/14658) - Remove backward compatibility for importing `process_webhook()` (now `extras.webhooks.send_webhook()`)
* [#14740](https://github.com/netbox-community/netbox/issues/14740) - Remove the obsolete `BootstrapMixin` form mixin class
* [#15099](https://github.com/netbox-community/netbox/issues/15099) - Remove obsolete `device_role` and `device_role_id` filters for devices
12 changes: 0 additions & 12 deletions netbox/dcim/filtersets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1288,18 +1288,6 @@ class DeviceComponentFilterSet(django_filters.FilterSet):
to_field_name='name',
label=_('Virtual Chassis'),
)
# TODO: Remove in v4.0
device_role_id = django_filters.ModelMultipleChoiceFilter(
field_name='device__role',
queryset=DeviceRole.objects.all(),
label=_('Device role (ID)'),
)
device_role = django_filters.ModelMultipleChoiceFilter(
field_name='device__role__slug',
queryset=DeviceRole.objects.all(),
to_field_name='slug',
label=_('Device role (slug)'),
)

def search(self, queryset, name, value):
if not value.strip():
Expand Down

0 comments on commit d8c6dad

Please sign in to comment.