Commit 47e67c3a authored by Gabriel Detraz's avatar Gabriel Detraz Committed by root

Retourne au moins l'interface principale du switch

parent d51f1e12
Pipeline #2267 passed with stage
in 3 minutes and 21 seconds
......@@ -307,7 +307,7 @@ class Switch(AclMixin, Machine):
It must the the management interface for that device"""
switch_iptype = OptionalTopologie.get_cached_value('switchs_ip_type')
if switch_iptype:
return self.interface_set.filter(machine_type__ip_type=switch_iptype).first()
return self.interface_set.filter(machine_type__ip_type=switch_iptype).first() or self.interface_set.first()
return self.interface_set.first()
@cached_property
......
Markdown is supported
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