From 6794148c04d6cfdb3ac9b4df38e0957f35334c5a Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Thu, 10 Mar 2022 10:17:29 +0100 Subject: [PATCH] fix(lead): reload contact before updating links (#29966) * fix(lead): reload contact before updading links Contact might have changed since it was created. * refactor: reload contact after insert --- erpnext/crm/doctype/lead/lead.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py index c31b068a43f..33ec5521522 100644 --- a/erpnext/crm/doctype/lead/lead.py +++ b/erpnext/crm/doctype/lead/lead.py @@ -214,6 +214,7 @@ class Lead(SellingController): }) contact.insert(ignore_permissions=True) + contact.reload() # load changes by hooks on contact return contact