From 2d0ae3605dc9574357f9864bb607f7faae178c35 Mon Sep 17 00:00:00 2001 From: JoelCourtney Date: Tue, 9 Jul 2024 10:30:42 -0700 Subject: [PATCH] Return initial sim results if latest is null --- .../scheduler/simulation/CheckpointSimulationFacade.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/simulation/CheckpointSimulationFacade.java b/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/simulation/CheckpointSimulationFacade.java index df66f6a55e..ba325f9176 100644 --- a/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/simulation/CheckpointSimulationFacade.java +++ b/scheduler-driver/src/main/java/gov/nasa/jpl/aerie/scheduler/simulation/CheckpointSimulationFacade.java @@ -334,7 +334,10 @@ public SimulationData simulateWithResults( @Override public Optional getLatestSimulationData() { - return Optional.ofNullable(this.latestSimulationData); + if (this.latestSimulationData == null) + return Optional.ofNullable(this.initialSimulationResults); + else + return Optional.ofNullable(this.latestSimulationData); } }