From 589f0f7f38c8a7d49fe23fb11ba28b2f0b1a043e Mon Sep 17 00:00:00 2001 From: Olga Marco Date: Mon, 13 Jun 2022 10:41:41 +0200 Subject: [PATCH] [IMP] mail_activity_team: Force team on schedule If you schedule an activity and you don't force the team as False, errors might araise. For example, on holidays. --- mail_activity_team/models/mail_activity_mixin.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mail_activity_team/models/mail_activity_mixin.py b/mail_activity_team/models/mail_activity_mixin.py index fdbcbd0..ded859a 100644 --- a/mail_activity_team/models/mail_activity_mixin.py +++ b/mail_activity_team/models/mail_activity_mixin.py @@ -72,9 +72,7 @@ class MailActivityMixin(models.AbstractModel): .with_context(default_res_model=self._name,) ._get_default_team_id(user_id=user_id) ) - # Even if it comes empty, we don't want to mismatch the user's team - if team: - act_values.update({"team_id": team.id}) + act_values.update({"team_id": team.id}) return super().activity_schedule( act_type_xmlid=act_type_xmlid, date_deadline=date_deadline,