[FIX] mail: prevent crash when destroying during attachment upload
File uploader might be deleted because it is linked to views, but the process of upload should still happen for the related thread. closes odoo/odoo#84085 X-original-commit: ddfcee8f35da4bcf16f258d1bdfd0cf08436d001 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -105,7 +105,7 @@ registerModel({
|
||||
});
|
||||
return;
|
||||
}
|
||||
return this.messaging.models['Attachment'].insert({
|
||||
return (composer || thread).messaging.models['Attachment'].insert({
|
||||
composer: composer && replace(composer),
|
||||
originThread: (!composer && thread) ? replace(thread) : undefined,
|
||||
...attachmentData,
|
||||
|
||||
Reference in New Issue
Block a user