-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client.companies.users(...) returns a list of intercom.company.Company #180
Comments
Hey @jarcoal 👋 >>> intercom.companies.users(company_id)
<intercom.collection_proxy.CollectionProxy object at 0x7f582fc78128>
>>> for user in intercom.companies.users(company_id):
... print(user.name)
...
Steven Hyde
Michael Kelso
>>> What arguments are you passing when experiencing this and what's the object that you're being presented with? |
Try checking |
Ah, got it - you're referring to each of the users returned. Yep, that's how this is defined in here. I do understand now how this can cause issues while trying to update all of the users belonging to a company like this: >>> for user in intercom.companies.users(company_id):
... user.custom_attributes["newCDA"] = "yup"
... intercom.users.save(user)
...
<intercom.company.Company object at 0x7f109be4d710> ☝️ That will actually update the company rather than the user - nice catch here! |
Exactly, it tries to send the save request to the wrong URL. Thanks for looking into that! |
I am facing with the same behavior in v3.1.0. Will there be a new version for this fix soon? |
Is this the intended behavior? Seems to cause issues when trying to save the user data back to Intercom.
The text was updated successfully, but these errors were encountered: