From 70af19378d6a24f72a11b5c0bacb2bcb0c9e83e4 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Wed, 9 Jun 2021 00:22:47 +0500 Subject: [PATCH] pdns page bug fix --- manageServices/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manageServices/views.py b/manageServices/views.py index e82afe5d1..33f874004 100755 --- a/manageServices/views.py +++ b/manageServices/views.py @@ -18,7 +18,11 @@ def managePowerDNS(request): data = {} 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': counter = 1