fix mypy issue for org tokens (#3541)

This commit is contained in:
Shuchang Zheng
2025-09-26 16:35:47 -07:00
committed by GitHub
parent 7cd1b37d9c
commit 8c54475fda
9 changed files with 15 additions and 13 deletions

View File

@@ -1985,7 +1985,7 @@ async def get_api_keys(
if organization_id != current_org.organization_id:
raise HTTPException(status_code=403, detail="You do not have permission to access this organization")
api_keys = []
org_auth_token = await app.DATABASE.get_valid_org_auth_token(organization_id, OrganizationAuthTokenType.api)
org_auth_token = await app.DATABASE.get_valid_org_auth_token(organization_id, OrganizationAuthTokenType.api.value)
if org_auth_token:
api_keys.append(org_auth_token)
return GetOrganizationAPIKeysResponse(api_keys=api_keys)

View File

@@ -400,7 +400,7 @@ async def get_onepassword_token(
try:
auth_token = await app.DATABASE.get_valid_org_auth_token(
organization_id=current_org.organization_id,
token_type=OrganizationAuthTokenType.onepassword_service_account,
token_type=OrganizationAuthTokenType.onepassword_service_account.value,
)
if not auth_token:
raise HTTPException(
@@ -503,7 +503,7 @@ async def get_azure_client_secret_credential(
try:
auth_token = await app.DATABASE.get_valid_org_auth_token(
organization_id=current_org.organization_id,
token_type=OrganizationAuthTokenType.azure_client_secret_credential,
token_type=OrganizationAuthTokenType.azure_client_secret_credential.value,
)
if not auth_token:
raise HTTPException(