Skip to content

Commit 4aae738

Browse files
committed
Reset workflow info on error
Should fix #908. Make sure that in case of an error when fetching workflows for an event, we clear out workflow data in redux just in case there is some data left in there for whatever reason.
1 parent eef58e5 commit 4aae738

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/slices/eventDetailsSlice.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2298,6 +2298,18 @@ const eventDetailsSlice = createSlice({
22982298
})
22992299
.addCase(fetchWorkflows.rejected, (state, action) => {
23002300
state.statusWorkflows = 'failed';
2301+
state.workflows = {
2302+
scheduling: false,
2303+
entries: [],
2304+
workflow: {
2305+
workflowId: "",
2306+
description: "",
2307+
},
2308+
};
2309+
state.workflowConfiguration = {
2310+
workflowId: "",
2311+
description: "",
2312+
};
23012313
state.errorWorkflows = action.error;
23022314
console.error(action.error);
23032315
})

0 commit comments

Comments
 (0)