Index: Riskeer/Integration/src/Riskeer.Integration.IO/Importers/HydraulicBoundaryDataImporter.cs =================================================================== diff -u -rd6f16f00a6856fd681596b2a8bc0c384bfea587b -rb0c204e3925b8ab26a91c96631c168f264e76a7e --- Riskeer/Integration/src/Riskeer.Integration.IO/Importers/HydraulicBoundaryDataImporter.cs (.../HydraulicBoundaryDataImporter.cs) (revision d6f16f00a6856fd681596b2a8bc0c384bfea587b) +++ Riskeer/Integration/src/Riskeer.Integration.IO/Importers/HydraulicBoundaryDataImporter.cs (.../HydraulicBoundaryDataImporter.cs) (revision b0c204e3925b8ab26a91c96631c168f264e76a7e) @@ -102,8 +102,8 @@ return false; } - if (readHydraulicLocationConfigurationDatabase.UsePreprocessorClosure - && !File.Exists(HydraulicBoundaryDataHelper.GetPreprocessorClosureFilePath(hlcdFilePath))) + bool usePreprocessorClosure = readHydraulicLocationConfigurationDatabase.ReadTracks.First(rt => rt.TrackId == readHydraulicBoundaryDatabase.TrackId).UsePreprocessorClosure; + if (usePreprocessorClosure && !File.Exists(HydraulicBoundaryDataHelper.GetPreprocessorClosureFilePath(hlcdFilePath))) { Log.Error(BuildErrorMessage(hlcdFilePath, Resources.HydraulicBoundaryDataImporter_PreprocessorClosure_sqlite_Not_Found)); return false; Index: Riskeer/Integration/src/Riskeer.Integration.IO/Importers/HydraulicLocationConfigurationDatabaseImporter.cs =================================================================== diff -u -re22ef44fdcbd4a072287a9389c6f2a47ceae34b0 -rb0c204e3925b8ab26a91c96631c168f264e76a7e --- Riskeer/Integration/src/Riskeer.Integration.IO/Importers/HydraulicLocationConfigurationDatabaseImporter.cs (.../HydraulicLocationConfigurationDatabaseImporter.cs) (revision e22ef44fdcbd4a072287a9389c6f2a47ceae34b0) +++ Riskeer/Integration/src/Riskeer.Integration.IO/Importers/HydraulicLocationConfigurationDatabaseImporter.cs (.../HydraulicLocationConfigurationDatabaseImporter.cs) (revision b0c204e3925b8ab26a91c96631c168f264e76a7e) @@ -98,9 +98,11 @@ return false; } - ReadResult readHydraulicLocationConfigurationDatabaseResult = ReadHydraulicLocationConfigurationDatabase( - readTrackIdResult.Items.Single()); + long trackId = readTrackIdResult.Items.Single(); + ReadResult readHydraulicLocationConfigurationDatabaseResult = + ReadHydraulicLocationConfigurationDatabase(trackId); + if (readHydraulicLocationConfigurationDatabaseResult.CriticalErrorOccurred || Canceled) { return false; @@ -114,8 +116,8 @@ return false; } - if (readHydraulicLocationConfigurationDatabase.UsePreprocessorClosure - && !File.Exists(HydraulicBoundaryDataHelper.GetPreprocessorClosureFilePath(FilePath))) + bool usePreprocessorClosure = readHydraulicLocationConfigurationDatabase.ReadTracks.First(rt => rt.TrackId == trackId).UsePreprocessorClosure; + if (usePreprocessorClosure && !File.Exists(HydraulicBoundaryDataHelper.GetPreprocessorClosureFilePath(FilePath))) { Log.Error(BuildErrorMessage(FilePath, Resources.HydraulicBoundaryDataImporter_PreprocessorClosure_sqlite_Not_Found)); return false; @@ -133,7 +135,7 @@ AddHydraulicLocationConfigurationSettingsToDataModel( readHydraulicLocationConfigurationDatabase.ReadHydraulicLocationConfigurationDatabaseSettings?.Single(), - readHydraulicLocationConfigurationDatabase.UsePreprocessorClosure); + usePreprocessorClosure); return true; }