Allow scanning past restart date if SKIPREST is active

This commit is contained in:
Joakim Hove 2021-07-22 08:01:19 +02:00
parent 56bb0cacf3
commit 106cc727c8

View File

@ -258,9 +258,12 @@ void ScheduleDeck::add_block(ScheduleTimeType time_type, const time_point& t, Sc
context.rst_skip = false;
if (t > this->m_restart_time) {
TimeStampUTC ts(TimeService::to_time_t(this->m_restart_time));
auto reason = fmt::format("Have scanned past restart data: {:4d}-{:02d}-{:02d}", ts.year(), ts.month(), ts.day());
throw OpmInputError(reason, location);
if (this->skiprest) {
TimeStampUTC ts(TimeService::to_time_t(this->m_restart_time));
auto reason = fmt::format("Have scanned past restart data: {:4d}-{:02d}-{:02d}", ts.year(), ts.month(), ts.day());
throw OpmInputError(reason, location);
}
context.rst_skip = false;
}
}
this->m_blocks.back().end_time(t);