More attempts to fix InterfaceListView

This commit is contained in:
Joseph Kennedy 2017-08-02 18:18:43 -04:00
parent 2232b04256
commit 9fccbc5c3c
2 changed files with 2 additions and 3 deletions

View File

@ -1239,7 +1239,7 @@ class Interface(models.Model):
self.device.identifier, self.device.identifier,
self.lag, self.lag,
self.name, self.name,
self.mac, self.mac_address,
self.form_factor, self.form_factor,
self.description, self.description,
]) ])

View File

@ -1556,8 +1556,7 @@ class InterfaceBulkImportView(PermissionRequiredMixin, BulkImportView):
class InterfaceListView(ObjectListView): class InterfaceListView(ObjectListView):
#queryset = Interface.objects.all() queryset = Interface.objects.all().filter(device=device)
queryset = Interface.objects.select_related('device__name')
filter = filters.InterfaceFilter filter = filters.InterfaceFilter
filter_form = forms.InterfaceFilterForm filter_form = forms.InterfaceFilterForm
table = tables.InterfaceListTable table = tables.InterfaceListTable