Merge branch 'master' of https://bitbucket.org/yackob03/quay
This commit is contained in:
commit
160ccc0d96
2 changed files with 4 additions and 2 deletions
|
@ -133,6 +133,8 @@ class FakeStripe(object):
|
|||
'plan': FAKE_PLAN,
|
||||
'current_period_start': timegm(datetime.now().utctimetuple()),
|
||||
'current_period_end': timegm((datetime.now() + timedelta(days=30)).utctimetuple()),
|
||||
'trial_start': timegm(datetime.now().utctimetuple()),
|
||||
'trial_end': timegm((datetime.now() + timedelta(days=30)).utctimetuple()),
|
||||
})
|
||||
|
||||
FAKE_CARD = AttrDict({
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Reference in a new issue