fix: miss model category、name on catalog page
This commit is contained in:
@@ -408,17 +408,20 @@ const AddModal: React.FC<AddModalProps> = (props) => {
|
|||||||
backend: defaultSpec.backend
|
backend: defaultSpec.backend
|
||||||
});
|
});
|
||||||
initFormDataBySource(defaultSpec);
|
initFormDataBySource(defaultSpec);
|
||||||
form.current.setFieldValue(
|
|
||||||
'name',
|
const name = _.toLower(current.name).replace(/\s/g, '-') || '';
|
||||||
_.toLower(current.name).replace(/\s/g, '-') || ''
|
form.current.setFieldValue('name', name);
|
||||||
);
|
|
||||||
|
|
||||||
if (defaultSpec.backend === backendOptionsMap.llamaBox) {
|
if (defaultSpec.backend === backendOptionsMap.llamaBox) {
|
||||||
setIsGGUF(true);
|
setIsGGUF(true);
|
||||||
} else {
|
} else {
|
||||||
setIsGGUF(false);
|
setIsGGUF(false);
|
||||||
}
|
}
|
||||||
const allValues = generateSubmitData(defaultSpec);
|
const allValues = generateSubmitData({
|
||||||
|
...defaultSpec,
|
||||||
|
categories: _.get(current, 'categories.0', null),
|
||||||
|
name
|
||||||
|
});
|
||||||
handleCheckCompatibility(allValues);
|
handleCheckCompatibility(allValues);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// ignore
|
// ignore
|
||||||
|
|||||||
Reference in New Issue
Block a user