Skip to content

Commit 2a67728

Browse files
authored
Merge pull request #36 from QualiNext/14157_bulk_deploy_with_workflows
Fix exception when workflows have no schedules (ticket 57441)
2 parents fd010b0 + ac8eded commit 2a67728

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Quali.Torque.Cli/Commands/Environments/EnvironmentBulkStartCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected override async Task RunTorqueCommandAsync(EnvironmentBulkStartUserCont
3434
{
3535
inputs = values[5].Split(';').Select(pair => pair.Split(':')).ToDictionary(pair => pair[0], pair => pair[1]);
3636
}
37-
catch (Exception e)
37+
catch (Exception)
3838
{
3939
ConsoleManager.WriteError($"Error parsing inputs on line {lineNumber}. Unparsed value was \"{values[5]}\", expected input in the format name:value;name:value. Skipping line.");
4040
continue;

Quali.Torque.Cli/Commands/Environments/EnvironmentStartCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private static ICollection<LaunchWorkflowRequest> WorkflowLaunchDetailsToWorkflo
7575
return workflowsDetails.Select(workflowLaunchDetails => new LaunchWorkflowRequest
7676
{
7777
Name = workflowLaunchDetails.Workflow_name,
78-
Schedules = workflowLaunchDetails.Scheduler.Cron_expressions
78+
Schedules = workflowLaunchDetails.Scheduler?.Cron_expressions
7979
.Select(s => new LaunchScheduleRequest { Overridden = false, Scheduler = s })
8080
.ToList()
8181
}).ToList();

0 commit comments

Comments
 (0)