mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-17 01:02:18 -06:00
* Fixes #18845: restores sort behavior for DeviceTable.name column * Remove accessor/order_by and modify DEVICE_LINK template Thanks to @alehaa for the suggestion. This also includes an additional `.select_related()` operation on `DeviceListView.queryset` to avoid extra queries. Thanks to @renatoalmeidaoliveira and @jeremystretch for pointing out the need for this.
This commit is contained in:
@@ -2034,7 +2034,7 @@ class PlatformBulkDeleteView(generic.BulkDeleteView):
|
||||
|
||||
@register_model_view(Device, 'list', path='', detail=False)
|
||||
class DeviceListView(generic.ObjectListView):
|
||||
queryset = Device.objects.all()
|
||||
queryset = Device.objects.select_related('virtual_chassis')
|
||||
filterset = filtersets.DeviceFilterSet
|
||||
filterset_form = forms.DeviceFilterForm
|
||||
table = tables.DeviceTable
|
||||
|
||||
Reference in New Issue
Block a user