fix when does not find a workspace
This commit is contained in:
@@ -31,6 +31,8 @@ def get_orgs(
|
||||
if 'DEFAULT' in x['sk']:
|
||||
preferred = x.get('org_id')
|
||||
else:
|
||||
items.append(x)
|
||||
# Post-migration (users): remove the following lines
|
||||
_, org_id = x['sk'].split('#')
|
||||
items.append(x | {'sk': f'ORG#{org_id}'})
|
||||
|
||||
return r | {'items': items} | ({'preferred_org_id': preferred} if preferred else {})
|
||||
|
||||
Reference in New Issue
Block a user