Skip to content
Snippets Groups Projects
Commit 4c9992c4 authored by Benjamin Becker's avatar Benjamin Becker
Browse files

fixes bug of commit before this

parent a8a59956
No related branches found
No related tags found
No related merge requests found
......@@ -156,6 +156,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) == 1:
if len(resources_sorted) == 0:
return None
return resources_sorted[-1]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment