mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-09 06:46:10 +01:00
bug fix: soa parsing ref https://github.com/usmannasir/cyberpanel/issues/1341
This commit is contained in:
@@ -680,11 +680,16 @@ class DNS:
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user