From a05eff87a15299f8f81c162dc752bedbf0f5dd74 Mon Sep 17 00:00:00 2001 From: William Braeckman Date: Wed, 17 Nov 2021 11:59:38 +0000 Subject: [PATCH] [FIX] project: fix not checking for user_ids presence Fixes an issue where new followers would always be checked upon updating a task. Which could result in a lot more queries than necessary when changes are cascading. See odoo/odoo#79931 TaskId-2693899 X-original-commit: 09adeb7fe2b4345bd476058b2bf85ac1c08a1d1f Part-of: odoo/odoo#79956 --- addons/project/models/project.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 9763acdc79b..0f6e4c69b51 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -1896,6 +1896,8 @@ class Task(models.Model): ) def _message_auto_subscribe_followers(self, updated_values, default_subtype_ids): + if 'user_ids' not in updated_values: + return [] # Since the changes to user_ids becoming a m2m, the default implementation of this function # could not work anymore, override the function to keep the functionality. new_followers = []