[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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user