Skip to content

Instantly share code, notes, and snippets.

@danielchatfield
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielchatfield/711f9154a42eb0ce3ab5 to your computer and use it in GitHub Desktop.
Save danielchatfield/711f9154a42eb0ce3ab5 to your computer and use it in GitHub Desktop.
github email testcase
Interesting bug, stripe needs to be able to distinguish between setting an
attribute to None which exists in the saved entity and setting an attribute
to None which hasn't been saved yet.
A hack to fix this would be to manually remove "coupon" from
customer._unsaved_values.
It looks like the __setattr__ method could be modified to check whether the
key is in _retrieve_params and if it isn't and the value is None then
remove the key from _unsaved_values. I'll put together a pull request when
I get back later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment