mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 23:41:12 +08:00
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:
@@ -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,
|
||||
|
||||
@@ -12,6 +12,7 @@ export type IMetaDataReturnJSONType = Record<
|
||||
|
||||
export interface IMetaDataReturnJSONSettingItem {
|
||||
key: string;
|
||||
type?: string;
|
||||
description?: string;
|
||||
enum?: string[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user