4.9.1 fix dataset (#4279) (#4280)
Some checks failed
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Has been cancelled

* fix dataset search node reference save

* rewrite

---------

Co-authored-by: heheer <1239331448@qq.com>
This commit is contained in:
Archer 2025-03-22 00:26:31 +08:00 committed by GitHub
parent 7f13eb4642
commit 1db39e8907
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,6 +131,10 @@ export async function rewriteAppWorkflowToSimple(formatNodes: StoreNodeItemType[
if (!val) {
input.value = [];
} else if (Array.isArray(val)) {
// Not rewrite reference value
if (val.length === 2 && val.every((item) => typeof item === 'string')) {
return;
}
input.value = val
.map((dataset: { datasetId: string }) => ({
datasetId: dataset.datasetId