From 2879f25aee1b8fe6ba42f98a627c40d8454c8f8a Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Fri, 24 Jan 2025 00:56:08 +0530 Subject: [PATCH] fix: do not override receiver if AgentEmail is not in payload --- crm/integrations/exotel/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crm/integrations/exotel/handler.py b/crm/integrations/exotel/handler.py index bdb9ebfd..7563ba04 100644 --- a/crm/integrations/exotel/handler.py +++ b/crm/integrations/exotel/handler.py @@ -276,7 +276,7 @@ def update_call_log(call_payload, status="Ringing", call_log=None): call_log.start_time = call_payload.get("StartTime") call_log.end_time = call_payload.get("EndTime") - if direction == "incoming": + if direction == "incoming" and call_payload.get("AgentEmail"): call_log.receiver = call_payload.get("AgentEmail") else: call_log.caller = frappe.session.user