From 941ad3b4a0b9a65cf2da863f7fa2543795e144ca Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Fri, 12 Sep 2025 18:35:45 +0800 Subject: [PATCH] Fix/enterprise model credential (#25611) --- .../model-auth/authorized/credential-item.tsx | 6 +++--- .../model-provider-page/model-modal/index.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/credential-item.tsx b/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/credential-item.tsx index 2d792d1705..0aa4ac6fbc 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/credential-item.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/credential-item.tsx @@ -92,10 +92,10 @@ const CredentialItem = ({ ) } { - showAction && ( + showAction && !credential.from_enterprise && (
{ - !disableEdit && !credential.not_allowed_to_use && !credential.from_enterprise && ( + !disableEdit && !credential.not_allowed_to_use && ( = ({ const formRef1 = useRef(null) const [selectedCredential, setSelectedCredential] = useState() const formRef2 = useRef(null) - const isEditMode = !!Object.keys(formValues).filter((key) => { + const isEditMode = !!credential && !!Object.keys(formSchemasValue || {}).filter((key) => { return key !== '__model_name' && key !== '__model_type' && !!formValues[key] }).length && isCurrentWorkspaceManager