Check for inconsistency in Observium model

This commit is contained in:
Benjamin Collet 2020-08-06 10:14:22 +02:00
parent 028966b35e
commit 4ade67947f

View file

@ -81,7 +81,10 @@ def search_ports(args):
for port in data['ports'].values(): for port in data['ports'].values():
if port['disabled'] == "1": continue if port['disabled'] == "1": continue
if port['deleted'] == "1": continue if port['deleted'] == "1": continue
if port['device_id'] in devices:
device = devices[port['device_id']] device = devices[port['device_id']]
else:
continue
if device['disabled'] == "1": continue if device['disabled'] == "1": continue
if args.short: if args.short: