From e2efc70e4491bb126d0c0ea3732af7793bb35463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 4 May 2017 18:17:37 +0200 Subject: [PATCH] Import new subscription info function --- cloud/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud/cli.py b/cloud/cli.py index 67dcbb8..af9e4af 100644 --- a/cloud/cli.py +++ b/cloud/cli.py @@ -15,14 +15,14 @@ manager_cloud = Manager( @manager_cloud.command def reconcile_subscribers(): """For every user, check their subscription status with the store.""" - from pillar.auth.subscriptions import fetch_user + from pillar.api.blender_cloud.subscription import fetch_subscription_info users_coll = current_app.data.driver.db['users'] unsubscribed_users = [] for user in users_coll.find({'roles': 'subscriber'}): print('Processing %s' % user['email']) print(' Checking subscription') - user_store = fetch_user(user['email']) + user_store = fetch_subscription_info(user['email']) if user_store['cloud_access'] == 0: print(' Removing subscriber role') users_coll.update(