fix: ignore no args to email read url

Some client can strip this and it will cause error.
This commit is contained in:
Ankush Menat 2023-07-26 09:23:06 +05:30
parent 6c509f6dd1
commit c45fbce2fa

View file

@ -411,7 +411,9 @@ def send_scheduled_email():
@frappe.whitelist(allow_guest=True)
def newsletter_email_read(recipient_email, reference_doctype, reference_name):
def newsletter_email_read(recipient_email=None, reference_doctype=None, reference_name=None):
if not (recipient_email and reference_name):
return
verify_request()
try:
doc = frappe.get_cached_doc("Newsletter", reference_name)