Skip to content

Commit

Permalink
#11134 Export completions: Call ensureReservoirCaseIsOpen before export
Browse files Browse the repository at this point in the history
This change will enable export without any open views.
  • Loading branch information
magnesj committed Jan 29, 2024
1 parent 9d7ab36 commit 33ad386
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,19 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
const std::vector<RimSimWellInView*>& simWells,
const RicExportCompletionDataSettingsUi& exportSettings )
{
if ( exportSettings.caseToApply() == nullptr || exportSettings.caseToApply()->eclipseCaseData() == nullptr )
if ( exportSettings.caseToApply() == nullptr )
{
RiaLogging::error( "Export Completions Data: Cannot export completions data without specified eclipse case" );
RiaLogging::error( "Export Completions Data: Cannot export completions data a valid Eclipse case" );
return;
}

// Ensure that the case is open. This will enable export without any open views.
// https://github.com/OPM/ResInsight/issues/11134
exportSettings.caseToApply()->ensureReservoirCaseIsOpen();

if ( exportSettings.caseToApply()->eclipseCaseData() == nullptr )
{
RiaLogging::error( "Export Completions Data: No data available for Eclipse Case" );
return;
}

Expand Down

0 comments on commit 33ad386

Please sign in to comment.