mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-19 05:52:05 +01:00
bug fix: dns record add ref : https://community.cyberpanel.net/t/txt-record-insertion-error/52133
This commit is contained in:
@@ -279,6 +279,7 @@ class DNSManager:
|
||||
zoneDomain = data['selectedZone']
|
||||
recordType = data['recordType']
|
||||
recordName = data['recordName']
|
||||
|
||||
ttl = int(data['ttl'])
|
||||
if ttl < 0:
|
||||
raise ValueError("TTL: The item must be greater than 0")
|
||||
|
||||
@@ -692,7 +692,7 @@ class DNS:
|
||||
def createDNSRecord(zone, name, type, value, priority, ttl):
|
||||
try:
|
||||
|
||||
if Records.objects.filter(name=name, type=type).count() > 0:
|
||||
if Records.objects.filter(name=name, type=type, content=value).count() > 0:
|
||||
return
|
||||
|
||||
if zone.type == 'MASTER':
|
||||
|
||||
Reference in New Issue
Block a user