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

Fixes #7446: Fix exception when viewing a large number of child IPs within a prefix

This commit is contained in:
jeremystretch
2021-10-05 12:07:03 -04:00
parent 1757102536
commit e09024e86f
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
### Bug Fixes
* [#7442](https://github.com/netbox-community/netbox/issues/7442) - Fix missing actions column on user-configured tables
* [#7446](https://github.com/netbox-community/netbox/issues/7446) - Fix exception when viewing a large number of child IPs within a prefix
---

View File

@ -130,7 +130,7 @@ class BaseTable(tables.Table):
prefixes/IP addresses/etc., where some table rows may represent available address space.
"""
if not hasattr(self, '_objects_count'):
self._objects_count = sum(1 for obj in self.data if getattr(obj, 'pk'))
self._objects_count = sum(1 for obj in self.data if hasattr(obj, 'pk'))
return self._objects_count