mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 05:09:11 +00:00
fix: autofixes by semgrep
This commit is contained in:
@@ -26,17 +26,15 @@ def send_message(sender, message, subject="Website Query"):
|
||||
lead = frappe.db.get_value("Lead", dict(email_id=sender))
|
||||
if not lead:
|
||||
new_lead = frappe.get_doc(
|
||||
dict(doctype="Lead", email_id=sender, lead_name=sender.split("@")[0].title())
|
||||
doctype="Lead", email_id=sender, lead_name=sender.split("@")[0].title()
|
||||
).insert(ignore_permissions=True)
|
||||
|
||||
opportunity = frappe.get_doc(
|
||||
dict(
|
||||
doctype="Opportunity",
|
||||
opportunity_from="Customer" if customer else "Lead",
|
||||
status="Open",
|
||||
title=subject,
|
||||
contact_email=sender,
|
||||
)
|
||||
doctype="Opportunity",
|
||||
opportunity_from="Customer" if customer else "Lead",
|
||||
status="Open",
|
||||
title=subject,
|
||||
contact_email=sender,
|
||||
)
|
||||
|
||||
if customer:
|
||||
|
||||
Reference in New Issue
Block a user