Skip to content

Commit

Permalink
[#3192] TestPackageSearchIndex-workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Aug 21, 2016
1 parent 8d45597 commit 14360ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/lib/search/index.py
Expand Up @@ -282,8 +282,9 @@ def index_package(self, pkg_dict, defer_commit=False):
# permission labels determine visibility in search, can't be set
# in original dataset or before_index plugins
labels = lib_plugins.get_permission_labels()
dataset = model.Package.get(pkg_dict['id'])
pkg_dict['permission_labels'] = labels.get_dataset_labels(
model.Package.get(pkg_dict['id']))
dataset) if dataset else [] # TestPackageSearchIndex-workaround

# send to solr:
try:
Expand Down

0 comments on commit 14360ed

Please sign in to comment.