Commit 15cde2cc authored by Nikolai Kristiansen's avatar Nikolai Kristiansen
Browse files

Fixes broken zone-file when Domain.domain_ip6addr is empty

parent d523b4ae
Pipeline #11 skipped
......@@ -46,7 +46,7 @@ class Command(BaseCommand):
# do the binaries exist?
for f in (self.checkzone_bin, self.bind_bin):
if not os.path.isfile(f):
if not os.path.isfile(f) and not debug:
print("ERROR: no such file %s, exiting..." % f)
if not debug:
......@@ -93,7 +93,7 @@ class Domain(models.Model):
if self.domain_ipaddr is not None:
content += "@\tIN\tA\t%s\n" % self.domain_ipaddr
if self.domain_ip6addr is not None:
if self.domain_ip6addr:
content += "@\tIN\tAAAA\t%s\n" % self.domain_ip6addr
content += "; SRV records\n"
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