Netbox Inventory: Group By Platforms (#52780)
Fixes the functionality to group_by 'platforms'. Adds the call to self.refresh_platforms_lookup back and fixes square brackets to return a list instead of a string.
This commit is contained in:
parent
c11af3dbef
commit
f9dfb78d3c
1 changed files with 2 additions and 1 deletions
|
@ -222,7 +222,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
|||
|
||||
def extract_platform(self, host):
|
||||
try:
|
||||
return self.platforms_lookup[host["platform"]["id"]]
|
||||
return [self.platforms_lookup[host["platform"]["id"]]]
|
||||
except Exception:
|
||||
return
|
||||
|
||||
|
@ -345,6 +345,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
|||
self.refresh_tenants_lookup,
|
||||
self.refresh_racks_lookup,
|
||||
self.refresh_device_roles_lookup,
|
||||
self.refresh_platforms_lookup,
|
||||
self.refresh_device_types_lookup,
|
||||
self.refresh_manufacturers_lookup,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue