Skip to content

Commit

Permalink
fix: when edit load balancing config not pass the empty filed value h…
Browse files Browse the repository at this point in the history
…idden (#8366)
  • Loading branch information
iamjoel committed Sep 13, 2024
1 parent 24af4b9 commit 5dfd7ab
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 5dfd7ab

Please sign in to comment.