Skip to content

Commit

Permalink
Merge branch 'github-3980-datastore-upload-error' of https://github.c…
Browse files Browse the repository at this point in the history
…om/ThrawnCA/ckan into ThrawnCA-github-3980-datastore-upload-error
  • Loading branch information
amercader committed Apr 3, 2020
2 parents a405849 + 94b9540 commit 81d1bfa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckan/lib/helpers.py
Expand Up @@ -2451,7 +2451,11 @@ def resource_view_get_fields(resource):
'limit': 0,
'include_total': False,
}
result = logic.get_action('datastore_search')({}, data)
import ckan.plugins as p
try:
result = logic.get_action('datastore_search')({}, data)
except p.toolkit.ObjectNotFound:
return []

fields = [field['id'] for field in result.get('fields', [])]

Expand Down

0 comments on commit 81d1bfa

Please sign in to comment.