diff --git a/crm/fcrm/doctype/crm_deal/crm_deal.py b/crm/fcrm/doctype/crm_deal/crm_deal.py index e9a1dd61..901f2179 100644 --- a/crm/fcrm/doctype/crm_deal/crm_deal.py +++ b/crm/fcrm/doctype/crm_deal/crm_deal.py @@ -106,8 +106,12 @@ class CRMDeal(Document): """ Find an SLA to apply to the deal. """ + if self.sla: return + sla = get_sla(self) if not sla: + self.first_responded_on = None + self.first_response_time = None return self.sla = sla.name diff --git a/crm/fcrm/doctype/crm_lead/crm_lead.py b/crm/fcrm/doctype/crm_lead/crm_lead.py index 6d26d1d1..f4ebe162 100644 --- a/crm/fcrm/doctype/crm_lead/crm_lead.py +++ b/crm/fcrm/doctype/crm_lead/crm_lead.py @@ -232,8 +232,12 @@ class CRMLead(Document): """ Find an SLA to apply to the lead. """ + if self.sla: return + sla = get_sla(self) if not sla: + self.first_responded_on = None + self.first_response_time = None return self.sla = sla.name