fix: autofixes by semgrep

This commit is contained in:
Mihir Kandoi
2026-01-01 21:56:12 +05:30
parent 767bb534c0
commit ca568a01f5
41 changed files with 294 additions and 373 deletions

View File

@@ -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: