diff --git a/crm/fcrm/doctype/crm_deal/crm_deal.py b/crm/fcrm/doctype/crm_deal/crm_deal.py index 21d5cd08..a69478a2 100644 --- a/crm/fcrm/doctype/crm_deal/crm_deal.py +++ b/crm/fcrm/doctype/crm_deal/crm_deal.py @@ -86,8 +86,8 @@ class CRMDeal(Document): if not agent: return - if self._assign: - assignees = json.loads(self._assign) + assignees = self.get_assigned_users() + if assignees: for assignee in assignees: if agent == assignee: # the agent is already set as an assignee diff --git a/crm/fcrm/doctype/crm_lead/crm_lead.py b/crm/fcrm/doctype/crm_lead/crm_lead.py index 7b8af194..51bd18eb 100644 --- a/crm/fcrm/doctype/crm_lead/crm_lead.py +++ b/crm/fcrm/doctype/crm_lead/crm_lead.py @@ -69,8 +69,8 @@ class CRMLead(Document): if not agent: return - if self.get("_assign"): - assignees = json.loads(self._assign) + assignees = self.get_assigned_users() + if assignees: for assignee in assignees: if agent == assignee: # the agent is already set as an assignee