From 870a24126efdec7c7b83ec688504dcf8073384bc Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Tue, 8 Dec 2020 22:49:47 +0530 Subject: [PATCH] fix: Display assignee only if the assignee has access to the account (#1500) --- .../api/v1/conversations/partials/_conversation.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/api/v1/conversations/partials/_conversation.json.jbuilder b/app/views/api/v1/conversations/partials/_conversation.json.jbuilder index 729b52379..735b47699 100644 --- a/app/views/api/v1/conversations/partials/_conversation.json.jbuilder +++ b/app/views/api/v1/conversations/partials/_conversation.json.jbuilder @@ -3,7 +3,7 @@ json.meta do json.partial! 'api/v1/models/contact.json.jbuilder', resource: conversation.contact end json.channel conversation.inbox.try(:channel_type) - if conversation.assignee + if conversation.assignee&.account json.assignee do json.partial! 'api/v1/models/agent.json.jbuilder', resource: conversation.assignee end