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

@@ -364,7 +364,8 @@ class WorkflowRunContext:
self, parameter: OnePasswordCredentialParameter, organization: Organization
) -> None:
org_auth_token = await app.DATABASE.get_valid_org_auth_token(
organization.organization_id, OrganizationAuthTokenType.onepassword_service_account
organization.organization_id,
OrganizationAuthTokenType.onepassword_service_account.value,
)
token = settings.OP_SERVICE_ACCOUNT_TOKEN
if org_auth_token:
@@ -919,7 +920,7 @@ class WorkflowRunContext:
@staticmethod
async def _get_azure_vault_client_for_organization(organization: Organization) -> AsyncAzureVaultClient:
org_auth_token = await app.DATABASE.get_valid_org_auth_token(
organization.organization_id, OrganizationAuthTokenType.azure_client_secret_credential
organization.organization_id, OrganizationAuthTokenType.azure_client_secret_credential.value
)
if org_auth_token:
azure_vault_client = AsyncAzureVaultClient.create_from_client_secret(org_auth_token.credential)