This is the traceback of error
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 61, in application
response = frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1013, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/email.py", line 75, in make
comm.insert(ignore_permissions=True)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 221, in insert
self._validate_links()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 731, in _validate_links
invalid_links, cancelled_links = self.get_invalid_links()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 471, in get_invalid_links
values.name = doctype
AttributeError: 'NoneType' object has no attribute 'name'
The code I’m using is this:
frappe.call({
method: "frappe.core.doctype.communication.email.make",
args: {
recipients: "my_email@mail.com",
content: b, // this b variable contains html code
subject: "Test",
doctype: "Panel", //name of doctype (is single doctype)
name: cur_frm.doc.name,
send_email: 1,
communication_medium: "Email",
},
async: false,
});
Any suggestion what I am doing wrong ?