Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ckanext-odsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open-Data
ckanext-odsh
Merge requests
!10
Return 404 on missing resource type
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Return 404 on missing resource type
31-return-404-on-missing-resource-type
into
v1.3
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Thorge Petersen
requested to merge
31-return-404-on-missing-resource-type
into
v1.3
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
Closes
#31
0
0
Merge request reports
Compare
v1.3
v1.3 (base)
and
latest version
latest version
439a9c46
1 commit,
3 years ago
1 file
+
2
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
ckanext/odsh/collection/helpers.py
+
2
−
0
Options
@@ -181,4 +181,6 @@ def get_latest_resources_for_format(collection_name, resource_format):
return
None
resources_with_asked_type
=
[
r
for
r
in
resources
if
r
.
get
(
'
format
'
).
upper
()
==
resource_format
.
upper
()]
resources_sorted
=
sorted
(
resources_with_asked_type
,
key
=
itemgetter
(
'
id
'
,
'
created
'
),
reverse
=
True
)
if
len
(
resources_sorted
)
<
2
:
return
None
return
resources_sorted
[
-
1
]
Loading