Commit 4601dc18 by x

fixes #35

parent 7ff04ad5
......@@ -248,8 +248,8 @@ class Record(models.Model):
raise ValidationError(u'ez ismeretlen rekord, ez nudli!')
def get_data(self):
retval = { 'type': self.type, 'ttl': self.ttl, 'address': self.address }
if self.host:
retval = { 'name': self.name, 'type': self.type, 'ttl': self.ttl, 'address': self.address }
if self.host and self.type in ['CNAME', 'A', 'AAAA']:
if self.type == 'A':
retval['address'] = self.host.pub_ipv4 if self.host.pub_ipv4 and not self.host.shared_ip else self.host.ipv4
retval['name'] = self.host.get_fqdn()
......
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