@@ -3,6 +3,7 @@ import { CoreSystem, PeripheralDevices, Studios, TriggeredActions } from '../col
33import {
44 convertObjectIntoOverrides ,
55 ObjectOverrideSetOp ,
6+ ObjectWithOverrides ,
67 wrapDefaultObject ,
78} from '@sofie-automation/corelib/dist/settings/objectWithOverrides'
89import {
@@ -268,7 +269,9 @@ export const addSteps = addMigrationSteps('1.52.0', [
268269 //@ts -expect-error settings is typed as Record<string, StudioRouteSet>
269270 const oldSettings = studio . settings
270271
271- const newSettings = wrapDefaultObject < IStudioSettings > ( oldSettings || { } )
272+ const newSettings = convertObjectIntoOverrides (
273+ oldSettings || { }
274+ ) as unknown as ObjectWithOverrides < IStudioSettings >
272275
273276 await Studios . updateAsync ( studio . _id , {
274277 $set : {
@@ -304,7 +307,7 @@ export const addSteps = addMigrationSteps('1.52.0', [
304307 for ( const system of systems ) {
305308 const oldSystem = system as ICoreSystem as PartialOldICoreSystem
306309
307- const newSettings = wrapDefaultObject < ICoreSystemSettings > ( {
310+ const newSettings = convertObjectIntoOverrides ( {
308311 cron : {
309312 casparCGRestart : {
310313 enabled : false ,
@@ -316,7 +319,7 @@ export const addSteps = addMigrationSteps('1.52.0', [
316319 } ,
317320 support : oldSystem . support ?? { message : '' } ,
318321 evaluationsMessage : oldSystem . evaluations ?? { enabled : false , heading : '' , message : '' } ,
319- } )
322+ } ) as unknown as ObjectWithOverrides < ICoreSystemSettings >
320323
321324 await CoreSystem . updateAsync ( system . _id , {
322325 $set : {
0 commit comments