Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MJU-POPS
ckanext-archiver
Commits
0fbf65f9
Commit
0fbf65f9
authored
Apr 21, 2020
by
Marko Kuder
Browse files
sorting broken links by number, then by organization
parent
70705eff
Changes
1
Hide whitespace changes
Inline
Side-by-side
ckanext/archiver/reports.py
View file @
0fbf65f9
...
...
@@ -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
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment