Merge pull request #1255 from corubba/bugfix/api-order

fix: deletes shall come first in api payload (#1251)
This commit is contained in:
jbe-dw 2022-09-23 09:20:41 +02:00 committed by GitHub
commit f8048bf6aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,7 +337,8 @@ class Record(object):
replaces = [replace_for_api(r) for r in new_rrsets]
deletes = [delete_for_api(r) for r in del_rrsets if not rrset_in(r, replaces)]
return {
'rrsets': replaces + deletes
# order matters: first deletions, then additions+changes
'rrsets': deletes + replaces
}
def apply(self, domain_name, submitted_records):