[FIX] mail: prevent traceback on attachment unlink
Due to asynchronous rendering, the attachment template can be rendered when its attachment is undefined, this was causing an issue with an unguarded getter call that was attempting to access the attachment. This commit fixes this issue. opw-2457983 closes odoo/odoo#65992 X-original-commit: 33802c65c3e8d04c54de3fca5903f66b34b9d13a Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
t-att-class="{
|
||||
'o-downloadable': props.isDownloadable,
|
||||
'o-editable': props.isEditable,
|
||||
'o-has-card-details': detailsMode === 'card',
|
||||
'o-has-card-details': attachment and detailsMode === 'card',
|
||||
'o-isUploading': attachment and attachment.isUploading,
|
||||
'o-viewable': attachment and attachment.isViewable,
|
||||
}" t-att-title="attachment ? attachment.displayName : undefined" t-att-data-attachment-local-id="attachment ? attachment.localId : undefined"
|
||||
|
||||
Reference in New Issue
Block a user