Update the freeloaders script.
This commit is contained in:
parent
c6a189001a
commit
e1035bcd63
1 changed files with 2 additions and 2 deletions
|
@ -1,13 +1,13 @@
|
||||||
from data import model
|
from data import model
|
||||||
from data.database import User
|
from data.database import User
|
||||||
from app import stripe
|
from app import billing as stripe
|
||||||
from data.plans import get_plan
|
from data.plans import get_plan
|
||||||
|
|
||||||
def get_private_allowed(customer):
|
def get_private_allowed(customer):
|
||||||
if not customer.stripe_id:
|
if not customer.stripe_id:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
subscription = stripe.Customer.retrieve(customer.stripe_id).subscription
|
subscription = stripe.Customer.retrieve(customer.stripe_id).get('subscription', None)
|
||||||
if subscription is None:
|
if subscription is None:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
Reference in a new issue