Skip to content

Commit 22f04eb

Browse files
authored
Add check for prefix_count for older NetBox versions in nb_inventory (#696)
1 parent 409ae95 commit 22f04eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/inventory/nb_inventory.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ def refresh_sites_lookup(self):
876876
self.sites_with_prefixes = set()
877877

878878
for site in sites:
879-
if site["prefix_count"] > 0:
879+
if site["prefix_count"] and site["prefix_count"] > 0:
880880
self.sites_with_prefixes.add(site["slug"])
881881
# Used by refresh_prefixes()
882882

0 commit comments

Comments
 (0)