Skip to content
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

Fix issue where auto_paging_iter failed on nested list objects. #855

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

dcr-stripe
Copy link
Contributor

r? @pakrym-stripe

Summary

Update convert_to_stripe_object to only override _retrieve_params is any params were passed. Otherwise, the class constructor will instantiate its own.

Fixes #854

Today when we create a StripeObject it says _retrieve_params to the value of the params kwarg. In this case, that means list objects always have _retrieve_params = {} (or any key/values passed to params).

This issue applied specifically to nested listing objects. We would invoke convert_to_stripe_object with params=None for the child list object. We then overrode the _retrieve_params to be None which caused auto_paging_iter to fail.

@stripe-ci stripe-ci assigned dcr-stripe and unassigned pakrym-stripe Aug 3, 2022
@dcr-stripe dcr-stripe merged commit c637f2d into master Aug 3, 2022
@remi-stripe remi-stripe deleted the dcr-fix-list branch September 28, 2023 23:11
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.

Errpr: argument of type 'NoneType' is not iterable when calling Invoice.lines.
2 participants