Update the freeloaders script.

This commit is contained in:
jakedt 2014-04-25 11:43:08 -04:00
parent c6a189001a
commit e1035bcd63

View file

@ -1,13 +1,13 @@
from data import model
from data.database import User
from app import stripe
from app import billing as stripe
from data.plans import get_plan
def get_private_allowed(customer):
if not customer.stripe_id:
return 0
subscription = stripe.Customer.retrieve(customer.stripe_id).subscription
subscription = stripe.Customer.retrieve(customer.stripe_id).get('subscription', None)
if subscription is None:
return 0