Commit cb82f9ac by Bach Dániel

one: fixed AttributeError in get_connect_host()

parent 8493ed67
......@@ -412,6 +412,8 @@ class Instance(models.Model):
return {"rdp": 3389, "nx": 22, "ssh": 22}[proto]
def get_connect_host(self):
"""Get public hostname."""
if self.firewall_host is None:
return _('None')
if self.template.network.nat:
return self.firewall_host.pub_ipv4
else:
......
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 sign in to comment