diff --git a/backend/api/Controllers/MissionSchedulingController.cs b/backend/api/Controllers/MissionSchedulingController.cs index 47ed547fa..9691db741 100644 --- a/backend/api/Controllers/MissionSchedulingController.cs +++ b/backend/api/Controllers/MissionSchedulingController.cs @@ -316,7 +316,7 @@ [FromBody] ScheduledMissionQuery scheduledMissionQuery MissionId = scheduledMissionDefinition.Id, Status = MissionStatus.Pending, MissionRunPriority = MissionRunPriority.Normal, - DesiredStartTime = scheduledMissionQuery.DesiredStartTime, + DesiredStartTime = scheduledMissionQuery.DesiredStartTime ?? DateTime.UtcNow, Tasks = missionTasks, InstallationCode = scheduledMissionQuery.InstallationCode, Area = area, diff --git a/backend/api/Controllers/Models/ScheduledMissionQuery.cs b/backend/api/Controllers/Models/ScheduledMissionQuery.cs index 3fae55b4e..7d0c4b09a 100644 --- a/backend/api/Controllers/Models/ScheduledMissionQuery.cs +++ b/backend/api/Controllers/Models/ScheduledMissionQuery.cs @@ -4,7 +4,7 @@ public struct ScheduledMissionQuery { public string RobotId { get; set; } public int EchoMissionId { get; set; } - public DateTime DesiredStartTime { get; set; } + public DateTime? DesiredStartTime { get; set; } public string InstallationCode { get; set; } public string? AreaName { get; set; } public TimeSpan? InspectionFrequency { get; set; } diff --git a/frontend/src/api/ApiCaller.tsx b/frontend/src/api/ApiCaller.tsx index f0478c4e4..e6f50e210 100644 --- a/frontend/src/api/ApiCaller.tsx +++ b/frontend/src/api/ApiCaller.tsx @@ -306,7 +306,6 @@ export class BackendAPICaller { const body = { robotId: desiredRobot[0].id, echoMissionId: echoMissionId, - desiredStartTime: new Date(), installationCode: installationCode, areaName: '', }