Browse Source

fix: model hide issue

Timothy Jaeryang Baek 3 months ago
parent
commit
f6c8184a74
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/lib/components/admin/Settings/Models.svelte

+ 9 - 1
src/lib/components/admin/Settings/Models.svelte

@@ -108,7 +108,15 @@
 				toast.success($i18n.t('Model updated successfully'));
 			}
 		} else {
-			const res = await createNewModel(localStorage.token, model).catch((error) => {
+			const res = await createNewModel(localStorage.token, {
+				meta: {},
+				id: model.id,
+				name: model.name,
+				base_model_id: null,
+				params: {},
+				access_control: {},
+				...model
+			}).catch((error) => {
 				return null;
 			});