Skip to content

Commit

Permalink
Merge branch 'bug-1363-error-500-api-empty-database'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hammond committed Dec 12, 2013
2 parents 52d1c1d + dceaf6f commit 6213f0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ckan/logic/action/get.py
Expand Up @@ -100,7 +100,9 @@ def package_list(context, data_dict):
offset = data_dict.get('offset')
if offset:
query = query.offset(offset)
return list(zip(*query.execute())[0])

## Returns the first field in each result record
return [r[0] for r in query.execute()]

@logic.validate(logic.schema.default_package_list_schema)
def current_package_list_with_resources(context, data_dict):
Expand Down

0 comments on commit 6213f0d

Please sign in to comment.