do not allow empty steps in workflows
This commit is contained in:
@@ -124,6 +124,16 @@ export default function Home({ user, allConfiguredWorkflows, userEntitiesWithLab
|
||||
return;
|
||||
}
|
||||
|
||||
for (const workflow of workflows) {
|
||||
for (const step of workflow.steps) {
|
||||
if (step.assignees.every(x => !x)) {
|
||||
toast.warning("There are empty steps in at least one of the configured workflows.");
|
||||
setIsLoading(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const filteredWorkflows: ApprovalWorkflow[] = workflows.map(workflow => ({
|
||||
...workflow,
|
||||
steps: workflow.steps.map(step => ({
|
||||
|
||||
Reference in New Issue
Block a user