Fix a bug in billing dealing with former customers.
This commit is contained in:
parent
35c1e6e53b
commit
f572749ace
1 changed files with 3 additions and 1 deletions
|
@ -401,7 +401,9 @@ def get_subscription():
|
||||||
if user.stripe_id:
|
if user.stripe_id:
|
||||||
private_repos = model.get_private_repo_count(user.username)
|
private_repos = model.get_private_repo_count(user.username)
|
||||||
cus = stripe.Customer.retrieve(user.stripe_id)
|
cus = stripe.Customer.retrieve(user.stripe_id)
|
||||||
return jsonify(subscription_view(cus.subscription, private_repos))
|
|
||||||
|
if cus.subscription:
|
||||||
|
return jsonify(subscription_view(cus.subscription, private_repos))
|
||||||
|
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
|
|
Reference in a new issue