From 471a3279b9233b71c84b6075b19128f5c496676b Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Mon, 28 Mar 2022 14:31:00 +0200 Subject: [PATCH] fix(lead): reload address and contact before updating their links (Backport #29966) (#29968) * fix(lead): reload address and contact before updating their links They might have changed since they were created. Backport of #29966. * 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 809a9d29138..bff4eab68fc 100644 --- a/erpnext/crm/doctype/lead/lead.py +++ b/erpnext/crm/doctype/lead/lead.py @@ -189,6 +189,7 @@ class Lead(SellingController): }) contact.insert(ignore_permissions=True) + contact.reload() # load changes by hooks on contact return contact