Skip to content

Commit

Permalink
fix:determine multiple result exceptions caused by admin (langgenius#…
Browse files Browse the repository at this point in the history
…2211)

Co-authored-by: chenxin <[email protected]>
  • Loading branch information
IAMZn1018 and chenxin authored Jan 25, 2024
1 parent f06b09a commit 7a57b12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/controllers/service_api/wraps.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def decorated(*args, **kwargs):
tenant_account_join = db.session.query(Tenant, TenantAccountJoin) \
.filter(Tenant.id == api_token.tenant_id) \
.filter(TenantAccountJoin.tenant_id == Tenant.id) \
.filter(TenantAccountJoin.role.in_(['owner', 'admin'])) \
.filter(TenantAccountJoin.role.in_(['owner'])) \
.one_or_none()
if tenant_account_join:
tenant, ta = tenant_account_join
Expand Down

0 comments on commit 7a57b12

Please sign in to comment.