summaryrefslogtreecommitdiff
path: root/addons/mail/wizard/mail_resend_message.py
diff options
context:
space:
mode:
authorVictor Feyens <vfe@odoo.com>2020-08-10 13:17:00 +0000
committerVictor Feyens <vfe@odoo.com>2020-08-14 09:56:10 +0000
commitfdb23e282b90ad95e4f909f7232eb0aa36038836 (patch)
treec29267645405b1fabd0b12c1276b89e6c7058f58 /addons/mail/wizard/mail_resend_message.py
parent65bf6988f941be6fe1e88202bc814e4b645abf79 (diff)
[IMP] *: wrong any() usage
Replace wrong usages of any(list|recordset), by any(generator) to speed up computations, avoiding list creations and/or looping twice on a recordset for nothing. any([generator]) => any(generator) any(filtered) => any(generator) closes odoo/odoo#55768 Related: odoo/enterprise#12360 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Diffstat (limited to 'addons/mail/wizard/mail_resend_message.py')
-rw-r--r--addons/mail/wizard/mail_resend_message.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/wizard/mail_resend_message.py b/addons/mail/wizard/mail_resend_message.py
index c2b8f508dec..b1c6304bbad 100644
--- a/addons/mail/wizard/mail_resend_message.py
+++ b/addons/mail/wizard/mail_resend_message.py
@@ -36,7 +36,7 @@ class MailResendMessage(models.TransientModel):
"resend": True,
"message": notif.format_failure_reason(),
}) for notif in notification_ids]
- has_user = any([notif.res_partner_id.user_ids for notif in notification_ids])
+ has_user = any(notif.res_partner_id.user_ids for notif in notification_ids)
if has_user:
partner_readonly = not self.env['res.users'].check_access_rights('write', raise_exception=False)
else: