Skip to content

Commit

Permalink
[#3444] faster datastore_dictionary helper
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Mar 6, 2017
1 parent 5961185 commit eecd7f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ckanext/datastore/helpers.py
Expand Up @@ -118,7 +118,10 @@ def datastore_dictionary(resource_id):
try:
return [
f for f in get_action('datastore_search')(
None, {u'resource_id': resource_id, u'limit': 0})['fields']
None, {
u'resource_id': resource_id,
u'limit': 0,
u'include_total': False})['fields']
if not f['id'].startswith(u'_')]
except (ObjectNotFound, NotAuthorized):
return []

0 comments on commit eecd7f4

Please sign in to comment.