Skip to Content
मेन्यू
This question has been flagged
1 Reply
4043 Views

Hi,

I have a list of users , I want it to be automatically added as followers when clicking send button .
I tried with this code , but still getting only the administrator as follower .
Any help please ?

def button_sent(self):

.....

users = []
for partner in self.partner_id.message_partner_ids.ids:
    if partner in users:
        users.append(partner)
self.message_subscribe(partner_ids=users)


Thanks.

Avatar
Discard
Best Answer

 

if partner in users:
will always return False since users = []. As a result, your code is always calling message_subscribe with [].
Avatar
Discard
Author

I did not put all the code .... , the list of users is filled

Related Posts Replies Views Activity
2
अग॰ 25
2460
3
फ़र॰ 25
3790
0
मई 24
46
1
अप्रैल 24
3504
4
सित॰ 23
5036