Преглед на файлове

fix:determine multiple result exceptions caused by admin (#2211)

Co-authored-by: chenxin <chenxin@limayao.com>
IAMZn преди 1 година
родител
ревизия
d60f1a5601
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      api/controllers/service_api/wraps.py

+ 1 - 1
api/controllers/service_api/wraps.py

@@ -75,7 +75,7 @@ def validate_dataset_token(view=None):
             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