mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix:determine multiple result exceptions caused by admin (#2211)
Co-authored-by: chenxin <chenxin@limayao.com>
This commit is contained in:
parent
da83f8403e
commit
d60f1a5601
|
@ -75,7 +75,7 @@ def validate_dataset_token(view=None):
|
||||||
tenant_account_join = db.session.query(Tenant, TenantAccountJoin) \
|
tenant_account_join = db.session.query(Tenant, TenantAccountJoin) \
|
||||||
.filter(Tenant.id == api_token.tenant_id) \
|
.filter(Tenant.id == api_token.tenant_id) \
|
||||||
.filter(TenantAccountJoin.tenant_id == Tenant.id) \
|
.filter(TenantAccountJoin.tenant_id == Tenant.id) \
|
||||||
.filter(TenantAccountJoin.role.in_(['owner', 'admin'])) \
|
.filter(TenantAccountJoin.role.in_(['owner'])) \
|
||||||
.one_or_none()
|
.one_or_none()
|
||||||
if tenant_account_join:
|
if tenant_account_join:
|
||||||
tenant, ta = tenant_account_join
|
tenant, ta = tenant_account_join
|
||||||
|
|
Loading…
Reference in New Issue
Block a user