Merge branch 'fix/chore-fix' into dev/plugin-deploy
Some checks are pending
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/amd64, build-api-amd64) (push) Waiting to run
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/arm64, build-api-arm64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/amd64, build-web-amd64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/arm64, build-web-arm64) (push) Waiting to run
Build and Push API & Web / create-manifest (api, DIFY_API_IMAGE_NAME, merge-api-images) (push) Blocked by required conditions
Build and Push API & Web / create-manifest (web, DIFY_WEB_IMAGE_NAME, merge-web-images) (push) Blocked by required conditions

This commit is contained in:
Yeuoly 2024-11-12 21:43:44 +08:00
commit 8ed2695286
No known key found for this signature in database
GPG Key ID: A66E7E320FB19F61
2 changed files with 4 additions and 4 deletions

View File

@ -148,7 +148,7 @@ class ApiToolProviderController(ToolProviderController):
:param tenant_id: the tenant id :param tenant_id: the tenant id
:return: the tools :return: the tools
""" """
if self.tools is not None: if len(self.tools) > 0:
return self.tools return self.tools
tools: list[ApiTool] = [] tools: list[ApiTool] = []

View File

@ -159,7 +159,7 @@ class ApiToolManageService:
# encrypt credentials # encrypt credentials
tool_configuration = ProviderConfigEncrypter( tool_configuration = ProviderConfigEncrypter(
tenant_id=tenant_id, tenant_id=tenant_id,
config=provider_controller.get_credentials_schema(), config=list(provider_controller.get_credentials_schema()),
provider_type=provider_controller.provider_type.value, provider_type=provider_controller.provider_type.value,
provider_identity=provider_controller.entity.identity.name, provider_identity=provider_controller.entity.identity.name,
) )
@ -291,7 +291,7 @@ class ApiToolManageService:
# get original credentials if exists # get original credentials if exists
tool_configuration = ProviderConfigEncrypter( tool_configuration = ProviderConfigEncrypter(
tenant_id=tenant_id, tenant_id=tenant_id,
config=provider_controller.get_credentials_schema(), config=list(provider_controller.get_credentials_schema()),
provider_type=provider_controller.provider_type.value, provider_type=provider_controller.provider_type.value,
provider_identity=provider_controller.entity.identity.name, provider_identity=provider_controller.entity.identity.name,
) )
@ -410,7 +410,7 @@ class ApiToolManageService:
if db_provider.id: if db_provider.id:
tool_configuration = ProviderConfigEncrypter( tool_configuration = ProviderConfigEncrypter(
tenant_id=tenant_id, tenant_id=tenant_id,
config=provider_controller.get_credentials_schema(), config=list(provider_controller.get_credentials_schema()),
provider_type=provider_controller.provider_type.value, provider_type=provider_controller.provider_type.value,
provider_identity=provider_controller.entity.identity.name, provider_identity=provider_controller.entity.identity.name,
) )