Skip to content

Commit

Permalink
[#2724] Improve log.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Read committed Nov 4, 2015
1 parent 27789db commit 34e1e3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/logic/action/get.py
Expand Up @@ -1945,7 +1945,8 @@ def package_search(context, data_dict):
package_dict = item.before_view(package_dict)
results.append(package_dict)
else:
log.error('No package_dict is coming from solr for package with id {}'.format(package))
log.error('No package_dict is coming from solr for package '
'id %s', package['id'])

count = query.count
facets = query.facets
Expand Down

3 comments on commit 34e1e3f

@tuffnatty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change obviously has not been tested. package is the former package['id'] string at this point, so it won't allow dict-like access, and will throw an exception.

@davidread
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tuffnatty - PR is here, if you could test it, please? #2861

@tuffnatty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Actually I have already sent my own PR #2860 (tested). But your solution seems to be a little bit cleaner. Sorry I can't test it at the moment, need to deploy a whole new testing environment.

Please sign in to comment.