Commit cb82f9ac by Bach Dániel

one: fixed AttributeError in get_connect_host()

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