mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-21 07:07:05 +00:00
utils.sort_domains wasn't right
This commit is contained in:
parent
1a74b81f44
commit
deebda06e1
@ -40,7 +40,7 @@ def sort_domains(domain_names, env):
|
||||
# Within each group, sort parent domains before subdomains and after that sort lexicographically.
|
||||
def sort_group(group):
|
||||
# Find the top-most domains.
|
||||
top_domains = sorted(d for d in group if len([s for s in group if s.startswith("." + d)]) == 0)
|
||||
top_domains = sorted(d for d in group if len([s for s in group if d.endswith("." + s)]) == 0)
|
||||
ret = []
|
||||
for d in top_domains:
|
||||
ret.append(d)
|
||||
|
Loading…
Reference in New Issue
Block a user