diff --git a/powerdnsadmin/models/record.py b/powerdnsadmin/models/record.py index f3c0e99..2a9ff71 100644 --- a/powerdnsadmin/models/record.py +++ b/powerdnsadmin/models/record.py @@ -293,6 +293,15 @@ class Record(object): # Get the list of rrsets to be added and deleted new_rrsets, del_rrsets = self.compare(domain_name, submitted_records) + # Remove blank comments from rrsets for compatability with some backends + for r in new_rrsets['rrsets']: + if not r['comments']: + del r['comments'] + + for r in del_rrsets['rrsets']: + if not r['comments']: + del r['comments'] + # Submit the changes to PDNS API try: headers = {}