Skip to content

Commit

Permalink
fix:determine multiple result exceptions caused by admin (#2211)
Browse files Browse the repository at this point in the history
Co-authored-by: chenxin <[email protected]>
  • Loading branch information
IAMZn1018 and chenxin authored Jan 25, 2024
1 parent da83f84 commit d60f1a5
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 d60f1a5

Please sign in to comment.