python-intercom
python-intercom copied to clipboard
using .update on the custom_attributes with a False value, that update is skipped upon save
attributes_dict = {'is_active': False}
This code failed to update on save with a False value within the dictionary.
user = intercom_client.users.find(email=user_email)
user.custom_attributes.update(attributes_dict)
intercom_client.users.save(user)
while this did work
user = intercom_client.users.find(email=user_email)
user.custom_attributes.update(attributes_dict)
for key, val in attributes_dict.iteritems():
user.custom_attributes[key] = val
intercom_client.users.save(user)