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

The handler into the save base resource kwargs is always taking into account even for None value. #237

Closed
moumoutte opened this issue Aug 4, 2020 · 3 comments
Assignees

Comments

@moumoutte
Copy link

If I've understand correctly the save method of the base resource, it's possible to provide a specific handler a the save moment, otherwise the handler is taking from the initial object.

https://github.com/Mangopay/mangopay2-python-sdk/blob/master/mangopay/base.py#L190

But, in the subquery (insert or update) , only the handler object from the kwargs is taking into account.

https://github.com/Mangopay/mangopay2-python-sdk/blob/master/mangopay/base.py#L210
and
https://github.com/Mangopay/mangopay2-python-sdk/blob/master/mangopay/base.py#L217

May be, it could be more resilient to use the self._handler attribute define at the beginning of the method ?

@moumoutte moumoutte changed the title The handler into the save base resource kwargs is always overwritten. The handler into the save base resource kwargs is always taking into account event for None value. Aug 4, 2020
@moumoutte moumoutte changed the title The handler into the save base resource kwargs is always taking into account event for None value. The handler into the save base resource kwargs is always taking into account even for None value. Aug 4, 2020
@mangomaxoasis
Copy link
Contributor

Hey @moumoutte
Looking into it, I'll keep you updated
Max

@mangomaxoasis mangomaxoasis self-assigned this Aug 7, 2020
@mangomaxoasis
Copy link
Contributor

Hi @moumoutte
We're currently working on the handlers (#134)
We'll be releasing something soon
Max

@mangomaxoasis
Copy link
Contributor

Added in lastest release

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

No branches or pull requests

2 participants