[FIX] mail: fix record deletion crash
Before this commit, calling `record.delete` twice would result in a crash. This is due to `this.Model`being cleared once the delete is done. This commit skips the deletion if it was already done: calling delete will result in the desired state anyway. This can be easily reproduced: - Throttle your network - Send a message on the discuss app - A crash occurs closes odoo/odoo#134254 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in: