Merge pull request #418 from tridz-dev/dev

This commit is contained in:
Shariq Ansari 2024-10-21 22:39:09 +05:30 committed by GitHub
commit 137ca727c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ class CRMDeal(Document):
def validate(self):
self.set_primary_contact()
self.set_primary_email_mobile_no()
if self.deal_owner and not self.is_new():
if not self.is_new() and self.has_value_changed("deal_owner") and self.deal_owner:
self.share_with_agent(self.deal_owner)
self.assign_agent(self.deal_owner)
if self.has_value_changed("status"):

View File

@ -21,7 +21,7 @@ class CRMLead(Document):
self.set_lead_name()
self.set_title()
self.validate_email()
if self.lead_owner and not self.is_new():
if not self.is_new() and self.has_value_changed("lead_owner") and self.lead_owner:
self.share_with_agent(self.lead_owner)
self.assign_agent(self.lead_owner)
if self.has_value_changed("status"):