diff options
| author | jvm-odoo <jvm@odoo.com> | 2020-06-11 06:56:25 +0000 |
|---|---|---|
| committer | jvm-odoo <jvm@odoo.com> | 2020-06-11 14:55:37 +0000 |
| commit | 7910723d36e5f0a8abf6da4c5b5e53b4c5e91c0a (patch) | |
| tree | 32cd5d076645aeb498c355a11022079f0cfd2d38 /addons/web/static/tests/fields/basic_fields_tests.js | |
| parent | 149763f372e58c26c4af29a995314d102dfa03ba (diff) | |
[FIX] mail: fix can't add follower
Issue
- Install Contacts
- Technical / Email / Subtypes / Discussions
- Uncheck Default
- Go on any contact
- Add an user as follower
- Edit the follower, check any box
- Save
- Re-edit for checking
Not saved
Cause
In mail_followers.py _add_followers method
We do:
```py
new_sids = set(channel_subtypes[channel_id]) - set(sids)
old_sids = set(sids) - set(channel_subtypes[channel_id])
```
If no box are checked, sids value will be [None] instead
of [] (_get_subscription_data) so, new_sids and old_sids
will have a value but old_sids should not, it override
the change we made
We have [None] value because in _get_subscription_data
we use array_agg which returns a list or None if there
are no input rows
Solution
Compute old_sids if sids is not [None]
OPW-2271472
closes odoo/odoo#52869
X-original-commit: b1cdef0272a797fe2c1e5e0634ff400d17480d85
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
0 files changed, 0 insertions, 0 deletions
