From 5088df4c5bb5fd8eca594e9aa3e39beb54fecdde Mon Sep 17 00:00:00 2001 From: Tejaswini Chile Date: Mon, 19 Dec 2022 13:35:53 +0530 Subject: [PATCH] fix: update inbox details for text search json --- .../api/v1/accounts/conversations/text_search.json.jbuilder | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/api/v1/accounts/conversations/text_search.json.jbuilder b/app/views/api/v1/accounts/conversations/text_search.json.jbuilder index 8c3cf700b..a06df0814 100644 --- a/app/views/api/v1/accounts/conversations/text_search.json.jbuilder +++ b/app/views/api/v1/accounts/conversations/text_search.json.jbuilder @@ -3,7 +3,7 @@ json.payload do json.array! @result[:conversations] do |conversation| json.partial! 'api/v1/models/conversation', formats: [:json], conversation: conversation json.agent do - json.partial! 'api/v1/models/agent', formats: [:json], resource: conversation.assignee if conversation.assignee.present? + json.partial! 'api/v1/models/agent', formats: [:json], resource: conversation.assignee if conversation.try(:assignee).present? end end end @@ -18,7 +18,7 @@ json.payload do json.array! @result[:messages] do |message| json.partial! 'api/v1/models/message', formats: [:json], message: message json.agent do - json.partial! 'api/v1/models/agent', formats: [:json], resource: message.conversation.assignee if message.conversation.assignee.present? + json.partial! 'api/v1/models/agent', formats: [:json], resource: message.conversation.assignee if message.conversation.try(:assignee).present? end json.inbox do if message.inbox.present?