Skip to content
Permalink
Browse files

[11.0][FIX] Filter attachments if datas is False

  • Loading branch information...
hveficent committed Mar 19, 2019
1 parent 98fe505 commit 665aae330575b43088674232f980cbe8a947d460
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/mail/models/mail_mail.py
@@ -285,7 +285,7 @@ def _send(self, auto_commit=False, raise_exception=False, smtp_session=None):
# `datas` (binary field) could bloat the browse cache, triggerring
# soft/hard mem limits with temporary data.
attachments = [(a['datas_fname'], base64.b64decode(a['datas']), a['mimetype'])
for a in mail.attachment_ids.sudo().read(['datas_fname', 'datas', 'mimetype'])]
for a in mail.attachment_ids.sudo().read(['datas_fname', 'datas', 'mimetype']) if a['datas'] is not False]

# specific behavior to customize the send email for notified partners
email_list = []

0 comments on commit 665aae3

Please sign in to comment.
You can’t perform that action at this time.