fix when does not find a workspace

This commit is contained in:
2026-01-20 14:51:20 -03:00
parent b3e60aea65
commit 9aca2bb223
3 changed files with 11 additions and 6 deletions

View File

@@ -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 {})