From 604ca395adf1f9d5ee060fdcc860cd01e7029a4e Mon Sep 17 00:00:00 2001 From: Tejaswini Chile Date: Mon, 12 Dec 2022 13:16:27 +0530 Subject: [PATCH] fix: issue with current account not being present for some user --- app/finders/text_search.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/finders/text_search.rb b/app/finders/text_search.rb index c7c3f9a98..5dfabca02 100644 --- a/app/finders/text_search.rb +++ b/app/finders/text_search.rb @@ -4,8 +4,7 @@ class TextSearch DEFAULT_STATUS = 'open'.freeze def initialize(current_user, params) - @current_user = current_user - @current_account = current_user.account + @current_account = current_user.account || Current.account @params = params end