@@ -3,6 +3,7 @@ import { CoreSystem, PeripheralDevices, Studios, TriggeredActions } from '../col
3
3
import {
4
4
convertObjectIntoOverrides ,
5
5
ObjectOverrideSetOp ,
6
+ ObjectWithOverrides ,
6
7
wrapDefaultObject ,
7
8
} from '@sofie-automation/corelib/dist/settings/objectWithOverrides'
8
9
import {
@@ -268,7 +269,9 @@ export const addSteps = addMigrationSteps('1.52.0', [
268
269
//@ts -expect-error settings is typed as Record<string, StudioRouteSet>
269
270
const oldSettings = studio . settings
270
271
271
- const newSettings = wrapDefaultObject < IStudioSettings > ( oldSettings || { } )
272
+ const newSettings = convertObjectIntoOverrides (
273
+ oldSettings || { }
274
+ ) as unknown as ObjectWithOverrides < IStudioSettings >
272
275
273
276
await Studios . updateAsync ( studio . _id , {
274
277
$set : {
@@ -304,7 +307,7 @@ export const addSteps = addMigrationSteps('1.52.0', [
304
307
for ( const system of systems ) {
305
308
const oldSystem = system as ICoreSystem as PartialOldICoreSystem
306
309
307
- const newSettings = wrapDefaultObject < ICoreSystemSettings > ( {
310
+ const newSettings = convertObjectIntoOverrides ( {
308
311
cron : {
309
312
casparCGRestart : {
310
313
enabled : false ,
@@ -316,7 +319,7 @@ export const addSteps = addMigrationSteps('1.52.0', [
316
319
} ,
317
320
support : oldSystem . support ?? { message : '' } ,
318
321
evaluationsMessage : oldSystem . evaluations ?? { enabled : false , heading : '' , message : '' } ,
319
- } )
322
+ } ) as unknown as ObjectWithOverrides < ICoreSystemSettings >
320
323
321
324
await CoreSystem . updateAsync ( system . _id , {
322
325
$set : {
0 commit comments