From 1519cdd7b70f57d4babbbfb7154a4d4d10742f62 Mon Sep 17 00:00:00 2001 From: Lucas Fernandez Date: Mon, 24 Jul 2023 15:42:07 +0200 Subject: [PATCH] Fix issue when doing first migration of the dashboard config --- backend/src/utils/resourceUtils.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/src/utils/resourceUtils.ts b/backend/src/utils/resourceUtils.ts index cea452fbd0..ee5fcdb77f 100644 --- a/backend/src/utils/resourceUtils.ts +++ b/backend/src/utils/resourceUtils.ts @@ -796,8 +796,14 @@ export const migrateTemplateDisablement = async ( undefined, options, ) - .then((response) => { - return response.body as DashboardConfig; + .then(() => { + return { + ...dashboardConfig, + spec: { + ...dashboardConfig.spec, + templateDisablement: templatesDisabled, + }, + }; }); } else { return dashboardConfig;