Skip to content

Commit

Permalink
outputworkflowresolver still has to resolve ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Heimbach committed Sep 15, 2023
1 parent b79f6d2 commit d905e65
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public function resolve(SubmissionEvent $submissionEvent): ?OutputWorkflowInterf

if ($userSelectedOutputWorkflow !== null) {
$selectedOutputWorkflows = $outputWorkflows->filter(function (OutputWorkflowInterface $outputWorkflow) use ($userSelectedOutputWorkflow) {
return $outputWorkflow->getName() === $userSelectedOutputWorkflow;
return is_numeric($userSelectedOutputWorkflow)
? $outputWorkflow->getId() === $userSelectedOutputWorkflow
: $outputWorkflow->getName() === $userSelectedOutputWorkflow;
});

return $selectedOutputWorkflows->count() === 1 ? $selectedOutputWorkflows->first() : null;
Expand Down

0 comments on commit d905e65

Please sign in to comment.