Using new blender_id.get_user_blenderid() function
This commit is contained in:
@@ -44,6 +44,7 @@ def reconcile_subscribers():
|
|||||||
import concurrent.futures
|
import concurrent.futures
|
||||||
|
|
||||||
from pillar.auth import UserClass
|
from pillar.auth import UserClass
|
||||||
|
from pillar.api import blender_id
|
||||||
from pillar.api.blender_cloud.subscription import do_update_subscription
|
from pillar.api.blender_cloud.subscription import do_update_subscription
|
||||||
|
|
||||||
sessions = threading.local()
|
sessions = threading.local()
|
||||||
@@ -75,14 +76,11 @@ def reconcile_subscribers():
|
|||||||
sess = sessions.session = requests.Session()
|
sess = sessions.session = requests.Session()
|
||||||
|
|
||||||
# Get the info from Blender ID
|
# Get the info from Blender ID
|
||||||
bid_user_ids = [auth['user_id']
|
bid_user_id = blender_id.get_user_blenderid(user)
|
||||||
for auth in user['auth']
|
if not bid_user_id:
|
||||||
if auth['provider'] == 'blender-id']
|
|
||||||
if not bid_user_ids:
|
|
||||||
with lock:
|
with lock:
|
||||||
count_skipped += 1
|
count_skipped += 1
|
||||||
return
|
return
|
||||||
bid_user_id = bid_user_ids[0]
|
|
||||||
|
|
||||||
url = urljoin(api_url, bid_user_id)
|
url = urljoin(api_url, bid_user_id)
|
||||||
resp = sess.get(url, headers={'Authorization': f'Bearer {api_token}'})
|
resp = sess.get(url, headers={'Authorization': f'Bearer {api_token}'})
|
||||||
|
Reference in New Issue
Block a user