mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
fix: delete dataset field error (#3925)
* fix: collection list count * fix: collection list count * update doc * perf: tts selector ui * fix: delete dataset field error * doc
This commit is contained in:
@@ -7,6 +7,7 @@ import { MongoDatasetTraining } from './training/schema';
|
||||
import { MongoDatasetData } from './data/schema';
|
||||
import { deleteDatasetDataVector } from '../../common/vectorStore/controller';
|
||||
import { MongoDatasetDataText } from './data/dataTextSchema';
|
||||
import { DatasetErrEnum } from '@fastgpt/global/common/error/code/dataset';
|
||||
|
||||
/* ============= dataset ========== */
|
||||
/* find all datasetId by top datasetId */
|
||||
@@ -54,7 +55,7 @@ export async function getCollectionWithDataset(collectionId: string) {
|
||||
.populate<{ dataset: DatasetSchemaType }>('dataset')
|
||||
.lean();
|
||||
if (!data) {
|
||||
return Promise.reject('Collection is not exist');
|
||||
return Promise.reject(DatasetErrEnum.unExistCollection);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
Reference in New Issue
Block a user