Fix auto metadata type issue (#15338)

### What problem does this PR solve?

Fix auto metadata type issue
https://github.com/infiniflow/ragflow/issues/15323

Type information is missing at frontend - backend correctly store the
type information for the auto metadata type.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Jack
2026-06-02 10:23:04 +08:00
committed by GitHub
parent e1403171f1
commit 67a3ed7558
2 changed files with 3 additions and 2 deletions

View File

@@ -116,13 +116,13 @@ export const util = {
description: item.description,
values: item.enum || [],
restrictDefinedValues: !!item.enum?.length,
valueType: DEFAULT_VALUE_TYPE,
valueType: item.type || DEFAULT_VALUE_TYPE,
} as IMetaDataTableData;
});
}
const properties = data.properties || {};
return Object.entries(properties).map(([key, property]) => {
const valueType = 'string';
const valueType = property.type || 'string';
const values = property.enum || property.items?.enum || [];
return {
field: key,

View File

@@ -12,6 +12,7 @@ export type IMetaDataReturnJSONType = Record<
export interface IMetaDataReturnJSONSettingItem {
key: string;
type?: string;
description?: string;
enum?: string[];
}