Skip to content

Commit

Permalink
[#2207] solr always needs tracking info
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Jan 12, 2015
1 parent 4619800 commit 27bbda1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ckan/lib/search/index.py
Expand Up @@ -185,9 +185,11 @@ def index_package(self, pkg_dict, defer_commit=False):
pkg_dict['organization'] = None

# tracking
if tracking_summary:
pkg_dict['views_total'] = tracking_summary['total']
pkg_dict['views_recent'] = tracking_summary['recent']
if not tracking_summary:
tracking_summary = model.TrackingSummary.get_for_package(
pkg_dict['id'])
pkg_dict['views_total'] = tracking_summary['total']
pkg_dict['views_recent'] = tracking_summary['recent']

resource_fields = [('name', 'res_name'),
('description', 'res_description'),
Expand Down

0 comments on commit 27bbda1

Please sign in to comment.