Skip to content

Commit

Permalink
Fix last successful mission run update
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonsf committed Jul 29, 2024
1 parent f601141 commit d0a9ebb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/api/Services/MissionDefinitionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ public async Task<MissionDefinition> UpdateLastSuccessfulMissionRun(string missi
logger.LogWarning("{Message}", errorMessage);
throw new MissionNotFoundException(errorMessage);
}
if (missionRun.Status == MissionStatus.Successful)
{
missionDefinition.LastSuccessfulRun = missionRun;
logger.LogInformation($"Updated last successful mission run on mission definition {missionDefinitionId} to mission run {missionRunId}");
}
return await Update(missionDefinition);
}

Expand Down

0 comments on commit d0a9ebb

Please sign in to comment.