fix: Handle case differences while sending email to a document (#33270)
This fails for doctypes where name isn't title case. E.g. `HD Ticket` becomes `Hd Ticket`.
This commit is contained in:
parent
972adc54b1
commit
1fa97d404a
1 changed files with 5 additions and 1 deletions
|
|
@ -401,7 +401,11 @@ class Communication(Document, CommunicationEmailMixin):
|
|||
return
|
||||
|
||||
for doctype, docname in parse_email([self.recipients, self.cc, self.bcc]):
|
||||
if not frappe.db.get_value(doctype, docname, ignore=True):
|
||||
# Both document and doctype names should be case insensitive in email addresses.
|
||||
doctype = frappe.db.get_value("DocType", doctype)
|
||||
if doctype:
|
||||
docname = frappe.db.get_value(doctype, docname, ignore=True)
|
||||
if not (doctype and docname):
|
||||
continue
|
||||
|
||||
self.add_link(doctype, docname)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue