Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: tools edit modal schema edit issue (#6396)

Carson929c22a4e8c4
diff --git a/web/app/components/tools/edit-custom-collection-modal/index.tsx b/web/app/components/tools/edit-custom-collection-modal/index.tsx
index c354bb919aa..5fcf6fb0248 100644
--- a/web/app/components/tools/edit-custom-collection-modal/index.tsx
+++ b/web/app/components/tools/edit-custom-collection-modal/index.tsx
@@ -87,9 +87,9 @@ const EditCustomCollectionModal: FC<Props> = ({
return
}
(async () => {
- const customCollection = getCustomCollection()
try {
const { parameters_schema, schema_type } = await parseParamsSchema(debouncedSchema)
+ const customCollection = getCustomCollection()
const newCollection = produce(customCollection, (draft) => {
draft.schema_type = schema_type
})
@@ -97,6 +97,7 @@ const EditCustomCollectionModal: FC<Props> = ({
setParamsSchemas(parameters_schema)
}
catch (e) {
+ const customCollection = getCustomCollection()
const newCollection = produce(customCollection, (draft) => {
draft.schema_type = ''
})