Skip to content

Commit

Permalink
Log if missionrun has no inspectionarea
Browse files Browse the repository at this point in the history
  • Loading branch information
andchiind committed Dec 18, 2024
1 parent 1739672 commit f9219bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/api/Services/MissionSchedulingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ public async Task StartNextMissionRunIfSystemIsAvailable(Robot robot)
return;
}

if (missionRun.InspectionArea == null)
{
logger.LogWarning("Mission {MissionRunId} does not have an inspection area and was therefore not started", missionRun.Id);
return;
}

if (robot.CurrentInspectionArea == null && missionRun.InspectionArea != null)
{
await robotService.UpdateCurrentInspectionArea(robot.Id, missionRun.InspectionArea.Id);
Expand Down

0 comments on commit f9219bd

Please sign in to comment.