-
Notifications
You must be signed in to change notification settings - Fork 287
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
Better handling of syncing deleted customers #358
Conversation
@tasn used cherry pick on your commits and resubmitted this PR - does this look OK to you? |
This looks great. Thank you. Also, extra thank you for adding the tests to finally get this PR merged in! Edit: forgot to mention, I'll now abandon my PR in favour of this one. |
@tasn great! Learned a lot of new git skills doing this too 👍 |
I was going to explain to you how to do it, but since you said you were new to git, I thought it may be too complex. Glad you managed to do it on your own and learn new tricks on the way. Git is a powerful tool, you can do very cool things with it. |
pinax/stripe/actions/customers.py
Outdated
if cu is None: | ||
cu = customer.stripe_customer | ||
|
||
if cu.get('deleted', False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small thing, but can you change to double-quotes to keep consistent with project style? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paltman np, done!
If we are getting this hook it means it's already deleted on the server, no need to try to delete it again.
5102b47
to
1224287
Compare
@paltman added a commit to use double quotes so this PR is good to go. |
Thanks everyone. Happy it's finally in! |
What's this PR do?
Modifies deleted customer webhook to purge customer locally and not attempt to delete customer again on Stripe.
Modifies customer syncing actions and management command to handle situation where customer is deleted remotely but not locally.
Any background context you want to provide?
What ticket or issue # does this fix?
Closes #268
Definition of Done (check if considered and/or addressed):