diff --git a/dns/dnsManager.py b/dns/dnsManager.py index 80be93284..9f19b7e5d 100755 --- a/dns/dnsManager.py +++ b/dns/dnsManager.py @@ -279,6 +279,7 @@ class DNSManager: zoneDomain = data['selectedZone'] recordType = data['recordType'] recordName = data['recordName'] + ttl = int(data['ttl']) if ttl < 0: raise ValueError("TTL: The item must be greater than 0") diff --git a/plogical/dnsUtilities.py b/plogical/dnsUtilities.py index c1bbac006..a4d32acc0 100755 --- a/plogical/dnsUtilities.py +++ b/plogical/dnsUtilities.py @@ -692,7 +692,7 @@ class DNS: def createDNSRecord(zone, name, type, value, priority, ttl): try: - if Records.objects.filter(name=name, type=type).count() > 0: + if Records.objects.filter(name=name, type=type, content=value).count() > 0: return if zone.type == 'MASTER':