diff --git a/plogical/dnsUtilities.py b/plogical/dnsUtilities.py index 077fbdfdd..a7924982a 100755 --- a/plogical/dnsUtilities.py +++ b/plogical/dnsUtilities.py @@ -680,11 +680,16 @@ def createDNSRecord(zone, name, type, value, priority, ttl): return if zone.type == 'MASTER': - getSOA = Records.objects.get(domainOwner=zone, type='SOA') - soaContent = getSOA.content.split(' ') - soaContent[2] = str(int(soaContent[2]) + 1) - getSOA.content = " ".join(soaContent) - getSOA.save() + try: + for getSOA in Records.objects.filter(domainOwner=zone, type='SOA'): + #getSOA = Records.objects.get(domainOwner=zone, type='SOA') + soaContent = getSOA.content.split(' ') + soaContent[2] = str(int(soaContent[2]) + 1) + getSOA.content = " ".join(soaContent) + getSOA.save() + except: + pass + if type == 'NS': if Records.objects.filter(name=name, type=type, content=value).count() == 0: