fix(crm): add argument types to the contact form handler

This commit is contained in:
Nabin Hait
2026-10-21 14:48:32 +05:30
parent fdabc6dd2a
commit 63e571208b
+2 -1
View File
@@ -7,9 +7,10 @@ from frappe.rate_limiter import rate_limit
from frappe.utils import escape_html
# nosemgrep: frappe-semgrep-rules.rules.security.guest-whitelisted-method -- reviewed: public Contact Us form; only parses the sender and sets lead ownership
@frappe.whitelist(allow_guest=True, methods=["POST"])
@rate_limit(limit=10, seconds=3 * 60)
def send_message(sender, message, subject="Website Query"):
def send_message(sender: str, message: str, subject: str = "Website Query"):
from frappe.www.contact import send_message as website_send_message
if frappe.get_single_value("Contact Us Settings", "is_disabled"):