Skip to content

using .update on the custom_attributes with a False value, that update is skipped upon save #185

@davidemerritt

Description

@davidemerritt

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions