This commit is contained in:
usmannasir
2024-10-23 11:25:29 +04:00
parent bfc2fc4c95
commit fd05ec4026

View File

@@ -680,11 +680,16 @@ class DNS:
return return
if zone.type == 'MASTER': if zone.type == 'MASTER':
getSOA = Records.objects.get(domainOwner=zone, type='SOA') try:
soaContent = getSOA.content.split(' ') for getSOA in Records.objects.filter(domainOwner=zone, type='SOA'):
soaContent[2] = str(int(soaContent[2]) + 1) #getSOA = Records.objects.get(domainOwner=zone, type='SOA')
getSOA.content = " ".join(soaContent) soaContent = getSOA.content.split(' ')
getSOA.save() soaContent[2] = str(int(soaContent[2]) + 1)
getSOA.content = " ".join(soaContent)
getSOA.save()
except:
pass
if type == 'NS': if type == 'NS':
if Records.objects.filter(name=name, type=type, content=value).count() == 0: if Records.objects.filter(name=name, type=type, content=value).count() == 0: