logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 49092945ab86725180e202945ae1bec03a32a634
parent: c82a2358bd051fb5313abd04de0722e12d4ebc07
Author: Aboobacker MK <aboobacker@redpanthers.co>
Date:   Sun,  4 Mar 2018 00:15:06 +0530

Fix 500 while searching after deleting a post (#6604)

Fixes #6602

Diffstat:

Mapp/services/search_service.rb4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/services/search_service.rb b/app/services/search_service.rb @@ -29,7 +29,9 @@ class SearchService < BaseService def perform_statuses_search! statuses = StatusesIndex.filter(term: { searchable_by: account.id }) .query(multi_match: { type: 'most_fields', query: query, operator: 'and', fields: %w(text text.stemmed) }) - .limit(limit).objects + .limit(limit) + .objects + .compact statuses.reject { |status| StatusFilter.new(status, account).filtered? } end