From 61a33ad477add933c5cfffc10bb1c307606a31b8 Mon Sep 17 00:00:00 2001 From: Sokratis Vidros Date: Wed, 2 Oct 2024 17:53:16 +0300 Subject: [PATCH 1/2] fix(worker): Handle workflows with undefined preferences The all part of workflow preferences is not always set for V2 preferences that were defined before the release of preferences. --- .source | 2 +- .../src/usecases/get-preferences/get-preferences.usecase.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.source b/.source index c9d04dd7b0f..62fc51a85cc 160000 --- a/.source +++ b/.source @@ -1 +1 @@ -Subproject commit c9d04dd7b0fcaa88f87e5dd5a0ef1e58e08b1fa3 +Subproject commit 62fc51a85cc2989cd5b13537b92acc15779517c3 diff --git a/libs/application-generic/src/usecases/get-preferences/get-preferences.usecase.ts b/libs/application-generic/src/usecases/get-preferences/get-preferences.usecase.ts index a4781cccdbe..0f324f9ec48 100644 --- a/libs/application-generic/src/usecases/get-preferences/get-preferences.usecase.ts +++ b/libs/application-generic/src/usecases/get-preferences/get-preferences.usecase.ts @@ -227,7 +227,7 @@ export class GetPreferences { const readOnlyPreferences = orderedPreferencesForReadOnly.map( ({ all }) => ({ - all: { readOnly: all.readOnly }, + all: { readOnly: all?.readOnly || false }, }), ) as WorkflowPreferences[]; From 5e0692b3dcd5654ac0cda335e36d34b153d8baa9 Mon Sep 17 00:00:00 2001 From: Sokratis Vidros Date: Wed, 2 Oct 2024 18:42:52 +0300 Subject: [PATCH 2/2] chore(root): Update .source --- .source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.source b/.source index 62fc51a85cc..c9d04dd7b0f 160000 --- a/.source +++ b/.source @@ -1 +1 @@ -Subproject commit 62fc51a85cc2989cd5b13537b92acc15779517c3 +Subproject commit c9d04dd7b0fcaa88f87e5dd5a0ef1e58e08b1fa3