Comments (3)
Seems a little quirky to have the permission class create objects, but not strictly broken.
What's with the if created: return False
? Can you not just fall through to the standard has_active_subscription
? That'd seem more obvious to me. (Eg it's not clear at first sight if a second call to the same API URL might succeed, without the user taking any other action, even though the first API failed)
from dj-stripe.
The reason for checking on created is has_active_subscription
does another query. If the customer
object was just created, then that means they absolutely do not have a subscription.
I'll touch on this in the code.
Also, it got moved to https://github.com/pydanny/dj-stripe/blob/master/djstripe/contrib/rest_framework/permissions.py
from dj-stripe.
@pydanny Do you still wish to review the code? I think contrib is an acceptable place for third-party package hooks.
from dj-stripe.
Related Issues (20)
- Link LineItem to an Invoice via some foreign key or related manager HOT 1
- Allow passing parameters to Invoice.retry() HOT 1
- What does it mean: " given that dj-stripe holds a copy of all your data regardless."? dj-stripe is who? what data? HOT 1
- dj-stripe 2.8 release HOT 2
- Add support for EU Bank Transfer payment method HOT 1
- `CommandError: Unknown model: djstripe.cd` HOT 1
- Can't create webhook endpoint with the admin HOT 19
- Invoice.discounts sync error HOT 3
- Subscription objects are missing a currency field HOT 2
- When I search on google, I see some ambiguous docs. HOT 1
- "No API key provided" error when adding a Webhook from Django Admin UI HOT 5
- API Key not defaulting to database key, when using _api_create HOT 3
- Upcoming invoice sync fails HOT 3
- Webhook form failing validation for docker stripe/cli
- Billing.unit_amount_decimal returns a database error if the value is more than 7 digits HOT 1
- CI of Project is failing and has been for months. HOT 4
- djstripe.models.payment_methods.PaymentMethod.DoesNotExist: PaymentMethod matching query does not exist HOT 3
- Database size? Excluding models? HOT 1
- No such transfer po_* HOT 18
- dj-stripe adds unwanted connections to db to query djstripe_webhookendpoint that blocks use of django-extensions commands like reset_db
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dj-stripe.