Fully disable inventory if set as false in config
This commit is contained in:
parent
a46a74b994
commit
e9b2701916
1 changed files with 4 additions and 4 deletions
|
|
@ -413,10 +413,10 @@ class ServerBase():
|
||||||
self.network.create_or_update_netbox_network_cards()
|
self.network.create_or_update_netbox_network_cards()
|
||||||
update_inventory = config.inventory and (config.register or
|
update_inventory = config.inventory and (config.register or
|
||||||
config.update_all or config.update_inventory)
|
config.update_all or config.update_inventory)
|
||||||
# update inventory if feature is enabled
|
if config.inventory:
|
||||||
self.inventory = Inventory(server=self)
|
self.inventory = Inventory(server=self)
|
||||||
if update_inventory:
|
if update_inventory:
|
||||||
self.inventory.create_or_update()
|
self.inventory.create_or_update()
|
||||||
# update psu
|
# update psu
|
||||||
if config.register or config.update_all or config.update_psu:
|
if config.register or config.update_all or config.update_psu:
|
||||||
self.power = PowerSupply(server=self)
|
self.power = PowerSupply(server=self)
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue