[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
This commit is contained in:
William Braeckman
2021-11-17 16:36:50 +00:00
parent 5a315a4364
commit a05eff87a1
+2
View File
@@ -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 = []