1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Drop add_prefetch from BaseTable; improve dynamic prefetching for table querysets

This commit is contained in:
Jeremy Stretch
2020-10-30 16:15:16 -04:00
parent 8d02303515
commit 97c8306eeb
3 changed files with 19 additions and 22 deletions

View File

@@ -40,8 +40,6 @@ class ConsoleConnectionTable(BaseTable):
verbose_name='Reachable'
)
add_prefetch = False
class Meta(BaseTable.Meta):
model = ConsolePort
fields = ('device', 'name', 'console_server', 'console_server_port', 'reachable')
@@ -72,8 +70,6 @@ class PowerConnectionTable(BaseTable):
verbose_name='Reachable'
)
add_prefetch = False
class Meta(BaseTable.Meta):
model = PowerPort
fields = ('device', 'name', 'pdu', 'outlet', 'reachable')
@@ -107,8 +103,6 @@ class InterfaceConnectionTable(BaseTable):
verbose_name='Reachable'
)
add_prefetch = False
class Meta(BaseTable.Meta):
model = Interface
fields = ('device_a', 'interface_a', 'device_b', 'interface_b', 'reachable')