Skip to content

Commit

Permalink
fix: save lead before creating deal
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik committed Dec 26, 2023
1 parent 65cd446 commit ebb8502
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crm/fcrm/doctype/crm_lead/crm_lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ def convert_to_deal(lead):
lead.converted = 1
if lead.sla:
lead.communication_status = 'Replied'
lead.save()
contact = lead.create_contact(False)
deal = lead.create_deal(contact)
lead.save()
return deal

0 comments on commit ebb8502

Please sign in to comment.