@@ -184,7 +184,7 @@ async function createSystemSnapshot(
184184 queryRundownLayouts = { showStyleBaseId : { $in : showStyleBaseIds } }
185185 queryTriggeredActions = { showStyleBaseIds : { $in : [ null , ...showStyleBaseIds ] } }
186186
187- if ( studioId ) queryDevices = { studioId : studioId }
187+ if ( studioId ) queryDevices = { 'studioAndConfigId. studioId' : studioId }
188188 else if ( organizationId ) queryDevices = { organizationId : organizationId }
189189
190190 const [ showStyleVariants , rundownLayouts , devices , triggeredActions ] = await Promise . all ( [
@@ -623,7 +623,7 @@ async function restoreFromSystemSnapshot(snapshot: SystemSnapshot): Promise<void
623623 snapshot . blueprints ? saveIntoDb ( Blueprints , { } , snapshot . blueprints ) : null ,
624624 snapshot . rundownLayouts ? saveIntoDb ( RundownLayouts , { } , snapshot . rundownLayouts ) : null ,
625625 snapshot . triggeredActions ? saveIntoDb ( TriggeredActions , { } , snapshot . triggeredActions ) : null ,
626- saveIntoDb ( PeripheralDevices , studioId ? { studioId : studioId } : { } , snapshot . devices ) ,
626+ saveIntoDb ( PeripheralDevices , studioId ? { 'studioAndConfigId. studioId' : studioId } : { } , snapshot . devices ) ,
627627 saveIntoDb ( CoreSystem , { } , [ snapshot . coreSystem ] ) ,
628628 ] ) )
629629 )
0 commit comments