Skip to content

Allow values of custom attributes to be None. #88

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

Closed
wants to merge 1 commit into from

Conversation

neocortex
Copy link

Hi,

I have None values in custom attributes of a company in Intercom (named 'UNKNOWN' in Intercom). Trying to find or create a company (e.g. Company. find(company_id='bla') gives a ValueError, complaining that custom data can only be numbers or strings. Afaik, Intercom does simply not allow nested values (and I guess that is what the flat_store functionality is supposed to be for).

This PR is to also allow null values in custom attributes. Unittests pass, and I have no problems with interacting with intercom using Nones.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.06% when pulling 5bb793a on neocortex:allow-none-custom-data into 949056d on jkeyes:master.

@jkeyes
Copy link
Contributor

jkeyes commented May 9, 2015

Thanks @neocortex. I followed the same rules as the official Ruby wrapper. I'll ask them why they preclude None/nil. I don't see a reason not to. @maiiku has merged this change into his PR.

@jkeyes
Copy link
Contributor

jkeyes commented May 12, 2015

Fixed and now in version 2.0, available from PyPi. See 8ca7d74 for the change and tests.

Thanks again, I've added your profile to the AUTHORS page.

@jkeyes jkeyes closed this May 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants