diff --git a/src/Cloud/Pipeline.php b/src/Cloud/Pipeline.php index 5cd919ce..a27b1d1c 100644 --- a/src/Cloud/Pipeline.php +++ b/src/Cloud/Pipeline.php @@ -27,7 +27,7 @@ public static function fromLegacyConfiguration(array $configuration): DTO\Pipeli return new DTO\Pipeline( $configuration['pipeline']['name'] ?? sprintf('Pipeline %s', $random), - $configuration['pipeline']['code'] ?? sprintf('pipeline_%s', $random), + $configuration['code'] ?? sprintf('pipeline_%s', $random), new DTO\StepList( ...array_map(function (array $stepConfig, int $order) { $name = $stepConfig['name'] ?? sprintf('step%d', $order); diff --git a/src/Cloud/Workflow.php b/src/Cloud/Workflow.php index bb247201..7d3b2159 100644 --- a/src/Cloud/Workflow.php +++ b/src/Cloud/Workflow.php @@ -31,7 +31,7 @@ public static function fromLegacyConfiguration(array $configuration): DTO\Workfl return new DTO\Workflow( $configuration['workflow']['name'] ?? sprintf('Workflow %s', $random), - $configuration['workflow']['code'] ?? sprintf('workflow_%s', $random), + $configuration['code'] ?? sprintf('workflow_%s', $random), new DTO\JobList( ...array_map( function (array $config, int $order) {