From c119b2e76b017417e0872ff4f54f0bc070b7e770 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Mon, 3 Nov 2025 08:43:35 -0700 Subject: [PATCH] Change order of deletion --- web/src/views/classification/ModelSelectionView.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web/src/views/classification/ModelSelectionView.tsx b/web/src/views/classification/ModelSelectionView.tsx index b353be65f..b1b462497 100644 --- a/web/src/views/classification/ModelSelectionView.tsx +++ b/web/src/views/classification/ModelSelectionView.tsx @@ -214,7 +214,7 @@ function ModelCard({ config, onClick, onDelete }: ModelCardProps) { const handleDelete = useCallback(async () => { try { - // First, remove from config to stop the processor + await axios.delete(`classification/${config.name}`); await axios.put("/config/set", { requires_restart: 0, update_topic: `config/classification/custom/${config.name}`, @@ -227,9 +227,6 @@ function ModelCard({ config, onClick, onDelete }: ModelCardProps) { }, }); - // Then, delete the model data and files - await axios.delete(`classification/${config.name}`); - toast.success(t("toast.success.deletedModel", { count: 1 }), { position: "top-center", });