Commit 0fbf65f9 authored by Marko Kuder's avatar Marko Kuder
Browse files

sorting broken links by number, then by organization

parent 70705eff
......@@ -83,7 +83,8 @@ def broken_links_index(include_sub_organizations=False):
num_broken_resources = 0
num_packages = 0
num_resources = 0
for org_name, org_counts in sorted(results.iteritems(), key=lambda r: r[0]):
#sort by number of broken resources (default 0) descending, then by organization ascending
for org_name, org_counts in sorted(results.iteritems(), key=lambda r: (r[1].get('broken_resources', 0) * -1, r[0])):
data.append(OrderedDict((
('organization_title', results[org_name]['organization_title']),
('organization_name', org_name),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment