Skip to content

Commit

Permalink
fix: use executable settings as defaults in form
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarlovi committed Aug 11, 2022
1 parent a78bfb8 commit 0f88837
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ProcessManagerBundle/Controller/ExecutableController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ public function runAction(Request $request): JsonResponse

if ($form) {
$form = $this->createForm($form);
$form->setData(json_decode($exe->getSettings()['params'] ?? '{}', true));
$startupConfig = $request->get('startupConfig', '{}');
$startupConfig = json_decode($startupConfig, true);
$handledForm = $form->submit($startupConfig);
$handledForm = $form->submit($startupConfig, false);

if (!$handledForm->isValid()) {
$errors = $this->formErrorSerializer->serializeErrorFromHandledForm($handledForm);
Expand Down

0 comments on commit 0f88837

Please sign in to comment.