Skip to content

Commit

Permalink
Make sure that template materials aren't displayed in Search results
Browse files Browse the repository at this point in the history
[#69955036]
  • Loading branch information
pjanik committed Jul 2, 2014
1 parent 8fc2544 commit fccaacf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/activity_runtime_api.rb
Expand Up @@ -55,6 +55,11 @@ def self.publish_activity(hash, user)
# update activity so external_activity.template is correctly initialzed
# otherwise external_activity.template.is_template? won't be true
activity.reload
# then reindex it manually, so Solr has correct value of :is_template attribute
Sunspot.index(activity)
# exactly the same applies to invesigation template
investigation.reload
Sunspot.index(investigation)
end

return external_activity
Expand Down Expand Up @@ -132,6 +137,8 @@ def self.publish_sequence(hash, user)
# update investigation so external_activity.template is correctly initialzed
# otherwise external_activity.template.is_template? won't be true
investigation.reload
# then reindex it manually, so Solr has correct value of :is_template attribute
Sunspot.index(investigation)
end
return external_activity
end
Expand Down

0 comments on commit fccaacf

Please sign in to comment.