Skip to content

Commit

Permalink
[#2939] Fixes for solr indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Oct 2, 2012
1 parent 0bf01d9 commit 7328414
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ckan/lib/search/index.py
Expand Up @@ -145,16 +145,16 @@ def index_package(self, pkg_dict, defer_commit=False):
# add groups
groups = pkg_dict.pop('groups', [])

# Capacity is different to the default only if using organizations
# where the dataset is only in one group. We will add the capacity
# from the single group that it is a part of if we have a group
if len(groups):
pkg_dict['capacity'] = groups[0].get('capacity', 'public')
else:
pkg_dict['capacity'] = 'public'
pkg_dict['capacity'] = 'public'

pkg_dict['groups'] = [group['name'] for group in groups]

# if there is an owner_org we want to add this to groups for index
# purposes
if pkg_dict['owner_org']:
pkg_dict['groups'].append(pkg_dict['organization']['name'])


# tracking
tracking_summary = pkg_dict.pop('tracking_summary', None)
if tracking_summary:
Expand Down

0 comments on commit 7328414

Please sign in to comment.