@@ -372,6 +372,11 @@ export function migrateScreens(interviewModelXml: XmlElement, flowProject: FlowP
372372 if ( settingsFlowControls . input && settingsFlowControls . input [ attributeType ] && settingsFlowControls . input [ attributeType ] [ opmInputStyle ] ) {
373373 inputControl . schemeId = settingsFlowControls . input [ attributeType ] [ opmInputStyle ] ;
374374 inputControl . inputStyle = schemeIdToInputStyle [ inputControl . schemeId ] ;
375+ if ( ! inputControl . inputStyle ) {
376+ logDocumentMigrationWarning ( "Invalid Scheme ID '" + inputControl . schemeId + "' referenced in settings file" ) ;
377+ inputControl . inputStyle = inputDataTypeToDefaultSchemeId [ attributeType ] [ "inputStyle" ] ;
378+ inputControl . schemeId = inputDataTypeToDefaultSchemeId [ attributeType ] [ "id" ] ;
379+ }
375380 } else {
376381 inputControl . inputStyle = inputDataTypeToDefaultSchemeId [ attributeType ] [ "inputStyle" ] ;
377382 inputControl . schemeId = inputDataTypeToDefaultSchemeId [ attributeType ] [ "id" ] ;
@@ -561,6 +566,11 @@ export function migrateScreens(interviewModelXml: XmlElement, flowProject: FlowP
561566 if ( settingsFlowControls . referenceRelationship && settingsFlowControls . referenceRelationship . toOne && settingsFlowControls . referenceRelationship . toOne [ opmInputStyle ] ) {
562567 referenceControl . schemeId = settingsFlowControls . referenceRelationship . toOne [ opmInputStyle ] ;
563568 referenceControl . inputStyle = schemeIdToInputStyle [ referenceControl . schemeId ] ;
569+ if ( ! referenceControl . inputStyle ) {
570+ logDocumentMigrationWarning ( "Invalid Scheme ID '" + referenceControl . schemeId + "' referenced in settings file" ) ;
571+ referenceControl . inputStyle = inputDataTypeToDefaultSchemeId [ "record" ] [ "inputStyle" ] ;
572+ referenceControl . schemeId = inputDataTypeToDefaultSchemeId [ "record" ] [ "id" ] ;
573+ }
564574 } else {
565575 referenceControl . inputStyle = inputDataTypeToDefaultSchemeId [ "record" ] [ "inputStyle" ] ;
566576 referenceControl . schemeId = inputDataTypeToDefaultSchemeId [ "record" ] [ "id" ] ;
@@ -588,6 +598,11 @@ export function migrateScreens(interviewModelXml: XmlElement, flowProject: FlowP
588598 if ( settingsFlowControls . referenceRelationship && settingsFlowControls . referenceRelationship . toMany && settingsFlowControls . referenceRelationship . toMany [ opmInputStyle ] ) {
589599 referenceControl . schemeId = settingsFlowControls . referenceRelationship . toMany [ opmInputStyle ] ;
590600 referenceControl . inputStyle = schemeIdToInputStyle [ referenceControl . schemeId ] ;
601+ if ( ! referenceControl . inputStyle ) {
602+ logDocumentMigrationWarning ( "Invalid Scheme ID '" + referenceControl . schemeId + "' referenced in settings file" ) ;
603+ referenceControl . inputStyle = "checkBox" ;
604+ referenceControl . schemeId = kindToDefaultSchemeId [ "referenceList" ] ;
605+ }
591606 } else {
592607 referenceControl . inputStyle = "checkBox" ; // Input style has to be checkbox
593608 referenceControl . schemeId = kindToDefaultSchemeId [ "referenceList" ] ;
0 commit comments