From 630f8157a7c207a08f7ab4d156c9136b35226a33 Mon Sep 17 00:00:00 2001 From: Alan Clucas Date: Tue, 16 Jul 2024 11:28:38 +0100 Subject: [PATCH] fix(ui): hide `Workflow gone` message when workflow is archived (#13308) Signed-off-by: Alan Clucas (cherry picked from commit efb52e50c5b4816599d60f22e33e9d4506a90a34) --- .../workflows/components/workflow-details/workflow-details.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/app/workflows/components/workflow-details/workflow-details.tsx b/ui/src/app/workflows/components/workflow-details/workflow-details.tsx index ed772d1d23e6..3b5b239b3dd2 100644 --- a/ui/src/app/workflows/components/workflow-details/workflow-details.tsx +++ b/ui/src/app/workflows/components/workflow-details/workflow-details.tsx @@ -361,9 +361,10 @@ export function WorkflowDetails({history, location, match}: RouteComponentProps< e => { if (e.type === 'DELETED') { setUid(e.object.metadata.uid); - setError(new Error('Workflow gone')); if (e.object.metadata.labels?.[archivalStatus]) { e.object.metadata.labels[archivalStatus] = 'Persisted'; + } else { + setError(new Error('Workflow gone')); } setWorkflow(e.object); } else {