From 52169f698c783e9e057b0be9df2cc0cdb47e72b5 Mon Sep 17 00:00:00 2001 From: Dominik Fahr Date: Mon, 12 Dec 2022 17:30:42 +0100 Subject: [PATCH] undo of commit a7f55de did not fix issue #1261 leaded into issue #1321 --- powerdnsadmin/lib/utils.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/powerdnsadmin/lib/utils.py b/powerdnsadmin/lib/utils.py index 5a62ee3..9e7cf20 100644 --- a/powerdnsadmin/lib/utils.py +++ b/powerdnsadmin/lib/utils.py @@ -119,16 +119,12 @@ def fetch_json(remote_url, def display_record_name(data): - # Check that the data argument is a tuple containing two elements - if isinstance(data, Iterable) and len(data) == 2: - record_name, domain_name = data - if record_name == domain_name: - return '@' - else: - return record_name + record_name, domain_name = data + if record_name == domain_name: + return '@' else: - # If data is not a tuple of length 2, return an empty string - return '' + return re.sub('\.{}$'.format(domain_name), '', record_name) + def display_master_name(data): """