From ee87bf0494e60c45c0ec7cec309ea47963ede26d Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Tue, 10 Dec 2024 12:18:41 +0100 Subject: [PATCH] Make threats optional in operational scenario schema --- frontend/src/lib/utils/schemas.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/lib/utils/schemas.ts b/frontend/src/lib/utils/schemas.ts index 7317705ce..a7429aa00 100644 --- a/frontend/src/lib/utils/schemas.ts +++ b/frontend/src/lib/utils/schemas.ts @@ -1,5 +1,4 @@ // schema for the validation of forms -import { description, threats } from '$paraglide/messages'; import { z, type AnyZodObject } from 'zod'; const toArrayPreprocessor = (value: unknown) => { @@ -456,7 +455,7 @@ export const AttackPathSchema = z.object({ export const operationalScenarioSchema = z.object({ ebios_rm_study: z.string(), attack_paths: z.string().uuid().array(), - threats: z.string().uuid().optional().array(), + threats: z.string().uuid().optional().array().optional(), description: z.string(), likelihood: z.number().optional().default(-1), is_selected: z.boolean().optional().default(false),