fix(web): model bugfix

This commit is contained in:
zhaoying
2026-01-29 14:51:27 +08:00
parent 537be81b8f
commit 5b9adb799f
3 changed files with 7 additions and 5 deletions

View File

@@ -44,7 +44,8 @@ const CustomModelModal = forwardRef<CustomModelModalRef, CustomModelModalProps>(
};
const handleUpdate = (data: CustomModelForm) => {
setLoading(true)
const res = isEdit ? updateCustomModel(model.id, data) : addCustomModel(data)
const { type, provider, ...rest} = data
const res = isEdit ? updateCustomModel(model.id, rest) : addCustomModel(data)
res.then(() => {
refresh && refresh()