Merge branch 'restructure' of https://bitbucket.org/yackob03/quay into restructure
This commit is contained in:
commit
55c0c12d04
1 changed files with 7 additions and 3 deletions
|
@ -1537,11 +1537,15 @@ def subscribe(user, plan, token, require_business_plan):
|
|||
if plan_obj['stripeId'] == plan:
|
||||
plan_found = plan_obj
|
||||
|
||||
if not plan_found:
|
||||
if not plan_found or plan_found['deprecated']:
|
||||
logger.warning('Plan not found or deprecated: %s', plan)
|
||||
abort(404)
|
||||
|
||||
if require_business_plan and not plan_found['bus_features'] and not plan_found['price'] == 0:
|
||||
abort(404)
|
||||
if (require_business_plan and not plan_found['bus_features'] and not
|
||||
plan_found['price'] == 0):
|
||||
logger.warning('Business attempting to subscribe to personal plan: %s',
|
||||
user.username)
|
||||
abort(400)
|
||||
|
||||
private_repos = model.get_private_repo_count(user.username)
|
||||
|
||||
|
|
Reference in a new issue