communication: fix attachments in email queue and generated reports
so, apparently i messed up some things that were responsible for handling file attachments in email queue and attached on-the-fly generated reports. these issues should be fixed now. Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
This commit is contained in:
parent
edaeaec5f3
commit
ba0045ef1f
2 changed files with 2 additions and 2 deletions
|
|
@ -280,7 +280,7 @@ def prepare_to_notify(doc, print_html=None, print_format=None, attachments=None)
|
|||
# is it a filename?
|
||||
try:
|
||||
# keep this for error handling
|
||||
_file = frappe.get_doc("File", {"file_name": a})
|
||||
_file = frappe.get_doc("File", a)
|
||||
_file.get_content()
|
||||
# these attachments will be attached on-demand
|
||||
# and won't be stored in the message
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ def prepare_message(email, recipient, recipients_list):
|
|||
|
||||
fid = attachment.get("fid")
|
||||
if fid:
|
||||
_file = frappe.get_doc("File", {"file_name": fid})
|
||||
_file = frappe.get_doc("File", fid)
|
||||
fcontent = _file.get_content()
|
||||
attachment.update({
|
||||
'fname': _file.file_name,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue