소스 검색

fix: when edit load balancing config not pass the empty filed value hidden (#8366)

tags/0.8.3
Joel 1 년 전
부모
커밋
5dfd7abb2b
No account linked to committer's email address
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      web/app/components/header/account-setting/model-provider-page/model-modal/model-load-balancing-entry-modal.tsx

+ 2
- 2
web/app/components/header/account-setting/model-provider-page/model-modal/model-load-balancing-entry-modal.tsx 파일 보기

@@ -192,12 +192,12 @@ const ModelLoadBalancingEntryModal: FC<ModelModalProps> = ({
})
const getSecretValues = useCallback((v: FormValue) => {
return secretFormSchemas.reduce((prev, next) => {
if (v[next.variable] === initialFormSchemasValue[next.variable])
if (isEditMode && v[next.variable] && v[next.variable] === initialFormSchemasValue[next.variable])
prev[next.variable] = '[__HIDDEN__]'

return prev
}, {} as Record<string, string>)
}, [initialFormSchemasValue, secretFormSchemas])
}, [initialFormSchemasValue, isEditMode, secretFormSchemas])

// const handleValueChange = ({ __model_type, __model_name, ...v }: FormValue) => {
const handleValueChange = (v: FormValue) => {

Loading…
취소
저장