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
TypeError: cannot concatenate 'str' and 'NoneType' objects #109
Comments
I looked through the other server side sdks, and most of them do implement checks around the id existing, so we do that here too. Thanks for the report. |
Feel free to open a PR if you'd like, otherwise, we'll add it to our backlog. |
I believe this is fixed now. Closing. |
Oh wait, it has not. Re-opening. |
Opened a PR internally for this, once it gets merged in and released, I'll close this issue. |
This is fixed in 3.55.0 |
…… (#327) * BTDXCLTS-1677 - Fix issue where not found error could choke on `None` values closes #109 * Update integration test
When I do
subscription.find(user.subscription_id)
, I get this error ifuser.subscription_id==None
. I can of course change my code to:so no real issue here :)
The "offending" code is here:
https://github.com/braintree/braintree_python/blob/master/braintree/subscription_gateway.py#L38
And there's possibly a similar issue here (though it might be wise not to
repr(nonce)
, I'm not sure):https://github.com/braintree/braintree_python/blob/master/braintree/credit_card_gateway.py#L58
Suggesting those should be, respectively,
raise NotFoundError("subscription with id " + repr(subscription_id) + " not found")
raise NotFoundError("payment method with nonce " + repr(nonce) + " locked, consumed or not found")
Tests:
For
test_subscription.py
:For
test_credit_card.py
:The text was updated successfully, but these errors were encountered: