From f96103db7946255280a1a7cdb1ab65a5e9dafdab Mon Sep 17 00:00:00 2001 From: Hidde Date: Sat, 30 Oct 2021 21:24:16 +0200 Subject: [PATCH] Replace [ZONE] placeholder with domain_name (#960) --- powerdnsadmin/models/record.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/powerdnsadmin/models/record.py b/powerdnsadmin/models/record.py index f8fceff..e2e2b5a 100644 --- a/powerdnsadmin/models/record.py +++ b/powerdnsadmin/models/record.py @@ -165,6 +165,8 @@ class Record(object): for record in submitted_records: # Format the record name # + # Translate template placeholders into proper record data + record['record_data'] = record['record_data'].replace('[ZONE]', domain_name) # Translate record name into punycode (IDN) as that's the only way # to convey non-ascii records to the dns server record['record_name'] = record['record_name'].encode('idna').decode()