fix retain key
This commit is contained in:
@@ -119,12 +119,12 @@ def _tenant(
|
||||
# Ensure user has ACL
|
||||
collect.get_item(
|
||||
KeyPair(user.id, ComposeKey(tenant_id, prefix='acls')),
|
||||
exception_cls=ForbiddenError,
|
||||
exc_cls=ForbiddenError,
|
||||
)
|
||||
|
||||
# For root tenant, provide the default Tenant
|
||||
if tenant_id == '*':
|
||||
return Tenant(id=tenant_id, name='default')
|
||||
|
||||
obj = collect.get_item(KeyPair(tenant_id, '0'), exception_cls=NotFoundError)
|
||||
return Tenant.parse_obj(obj)
|
||||
obj = collect.get_item(KeyPair(tenant_id, '0'), exc_cls=NotFoundError)
|
||||
return Tenant.model_validate(obj)
|
||||
|
||||
Reference in New Issue
Block a user