1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-04 15:54:48 +01:00
This commit is contained in:
downtownallday
2021-10-26 23:05:35 -04:00
2 changed files with 9 additions and 6 deletions

View File

@@ -340,7 +340,7 @@ def dns_get_records(qname=None, rtype=None):
r["sort-order"]["created"] = i
domain_sort_order = utils.sort_domains([r["qname"] for r in records], env)
for i, r in enumerate(sorted(records, key = lambda r : (
zones.index(r["zone"]),
zones.index(r["zone"]) if r.get("zone") else 0, # record is not within a zone managed by the box
domain_sort_order.index(r["qname"]),
r["rtype"]))):
r["sort-order"]["qname"] = i