[FIX] mail: Check if attachment has mimetype

- Check if the attachment has a mimetype before trying to split its value.
This commit is contained in:
tbe-odoo
2018-03-02 13:16:26 +01:00
parent 515160978a
commit aded844129
+1 -1
View File
@@ -267,7 +267,7 @@
</t>
<t t-name="mail.Attachment">
<t t-set="type" t-value="attachment.mimetype.split('/').shift()"/>
<t t-set="type" t-value="attachment.mimetype and attachment.mimetype.split('/').shift()"/>
<div t-attf-class="o_attachment #{attachment.upload ? 'o_attachment_uploading' : ''}" t-att-title="attachment.name">
<t t-if="type == 'image'">
<div class="o_image_box">