pdns page bug fix

This commit is contained in:
Usman Nasir
2021-06-09 00:22:47 +05:00
parent 8c0ce5ea15
commit 70af19378d

View File

@@ -18,7 +18,11 @@ def managePowerDNS(request):
data = {} data = {}
data['status'] = 1 data['status'] = 1
pdnsStatus = PDNSStatus.objects.get(pk=1) try:
pdnsStatus = PDNSStatus.objects.get(pk=1)
except:
pdnsStatus = PDNSStatus(type='NATIVE', serverStatus=1)
pdnsStatus.save()
if pdnsStatus.type == 'MASTER': if pdnsStatus.type == 'MASTER':
counter = 1 counter = 1