Prevent failure in case no record is found (empty database) (fixes #1363)
Merge branch 'master' of github.com:okfn/ckan into bug-1363-error-500-api-empty-database
Merge branch 'bug-1363-error-500-api-empty-database'