Kaynağa Gözat

Fixes #2182: ValueError raised when viewing the interface connections table

Jeremy Stretch 7 yıl önce
ebeveyn
işleme
6dde0f030a
1 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. 4 4
      netbox/dcim/tables.py

+ 4 - 4
netbox/dcim/tables.py

@@ -7,9 +7,9 @@ from tenancy.tables import COL_TENANT
 from utilities.tables import BaseTable, ToggleColumn
 from utilities.tables import BaseTable, ToggleColumn
 from .models import (
 from .models import (
     ConsolePort, ConsolePortTemplate, ConsoleServerPort, ConsoleServerPortTemplate, Device, DeviceBay,
     ConsolePort, ConsolePortTemplate, ConsoleServerPort, ConsoleServerPortTemplate, Device, DeviceBay,
-    DeviceBayTemplate, DeviceRole, DeviceType, Interface, InterfaceTemplate, InventoryItem, Manufacturer, Platform,
-    PowerOutlet, PowerOutletTemplate, PowerPort, PowerPortTemplate, Rack, RackGroup, RackReservation, Region, Site,
-    VirtualChassis,
+    DeviceBayTemplate, DeviceRole, DeviceType, Interface, InterfaceConnection, InterfaceTemplate, InventoryItem,
+    Manufacturer, Platform, PowerOutlet, PowerOutletTemplate, PowerPort, PowerPortTemplate, Rack, RackGroup,
+    RackReservation, Region, Site, VirtualChassis,
 )
 )
 
 
 REGION_LINK = """
 REGION_LINK = """
@@ -594,7 +594,7 @@ class InterfaceConnectionTable(BaseTable):
     interface_b = tables.Column(verbose_name='Interface B')
     interface_b = tables.Column(verbose_name='Interface B')
 
 
     class Meta(BaseTable.Meta):
     class Meta(BaseTable.Meta):
-        model = Interface
+        model = InterfaceConnection
         fields = ('device_a', 'interface_a', 'device_b', 'interface_b')
         fields = ('device_a', 'interface_a', 'device_b', 'interface_b')