Skip to content
Snippets Groups Projects
Commit f8380854 authored by Thorge Petersen's avatar Thorge Petersen
Browse files

Revert "Merge branch '31-return-404-on-missing-resource-type' into 'v1.3'"

This reverts commit 7fcef1ce, reversing
changes made to 772f22c9.
parent cc32c962
Branches ckan-2.11.0
No related tags found
4 merge requests!38Merge py3 into dev,!33Resolve "Angabe zum Musterdatensatz beim DCAT-Harvesting übernehmen",!31Revert "Merge branch '31-return-404-on-missing-resource-type' into 'v1.3'",!30Revert "Merge branch '31-return-404-on-missing-resource-type' into 'v1.3'"
......@@ -181,6 +181,4 @@ 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]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment