Commit 31e99c96 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Merge branch 'fix-avs-none-hostname' into 'master'

Fix error when hostname None value.

See merge request noc/noc!6402
parents e7a2ac57 2faf685b
...@@ -116,7 +116,7 @@ class DiscoveryID(Document): ...@@ -116,7 +116,7 @@ class DiscoveryID(Document):
old_macs = set(m.first_mac for m in o.chassis_mac) old_macs = set(m.first_mac for m in o.chassis_mac)
o.chassis_mac = ranges o.chassis_mac = ranges
o.hostname = hostname o.hostname = hostname
o.hostname_id = hostname.lower() o.hostname_id = hostname.lower() if hostname else None
o.router_id = router_id o.router_id = router_id
old_macs -= set(m.first_mac for m in o.chassis_mac) old_macs -= set(m.first_mac for m in o.chassis_mac)
if old_macs: if old_macs:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment