diff --git a/netbox_zabbix_sync.py b/netbox_zabbix_sync.py index 9526f9e..a7fe91e 100755 --- a/netbox_zabbix_sync.py +++ b/netbox_zabbix_sync.py @@ -182,13 +182,12 @@ def main(arguments): device.cleanup() logger.info(f"Cleaned up host {device.name}.") continue - else: - # Device has been added to Netbox - # but is not in Activate state - logger.info(f"Skipping host {device.name} since its " - f"not in the active state.") - continue - elif device.status in zabbix_device_disable: + # Device has been added to Netbox + # but is not in Activate state + logger.info(f"Skipping host {device.name} since its " + f"not in the active state.") + continue + if device.status in zabbix_device_disable: device.zabbix_state = 1 else: device.zabbix_state = 0