From d87a8d8b997efd114b19a07e0382eca691acd918 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Sun, 24 Sep 2023 14:01:05 +0400 Subject: [PATCH] possible resolution of https://github.com/usmannasir/cyberpanel/issues/1124 --- install/test.py | 6 ------ plogical/dnsUtilities.py | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/install/test.py b/install/test.py index 73ce2ef79..e69de29bb 100755 --- a/install/test.py +++ b/install/test.py @@ -1,6 +0,0 @@ -import secrets -import string - -alphabet = string.ascii_letters + string.digits -the_password = ''.join(secrets.choice(alphabet) for _ in range(14)) -print(the_password) \ No newline at end of file diff --git a/plogical/dnsUtilities.py b/plogical/dnsUtilities.py index 25ab026a4..1c9f0cb77 100755 --- a/plogical/dnsUtilities.py +++ b/plogical/dnsUtilities.py @@ -633,6 +633,9 @@ def createDNSRecordCloudFlare(cf, zone, name, type, value, priority, ttl): def createDNSRecord(zone, name, type, value, priority, ttl): try: + if Records.objects.filter(name=name, type=type).count() > 0: + return + if zone.type == 'MASTER': getSOA = Records.objects.get(domainOwner=zone, type='SOA') soaContent = getSOA.content.split(' ')