[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#90102 X-original-commit: aa57c1804ecd9c88188e33c098b805f65f103a33 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -145,7 +145,7 @@ registerModel({
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const response = await this.messaging.browser.fetch('/mail/attachment/upload', {
|
||||
const response = await (composer || thread).messaging.browser.fetch('/mail/attachment/upload', {
|
||||
method: 'POST',
|
||||
body: this._createFormData({ composer, file, thread }),
|
||||
signal: uploadingAttachment.uploadingAbortController.signal,
|
||||
|
||||
Reference in New Issue
Block a user