Skip to content

Commit

Permalink
Fix virtualfull job wizard for using existing jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
ganiuszka committed Sep 4, 2024
1 parent f596b9a commit da75b27
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Web/Pages/NewVirtualFullJobWizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -855,10 +855,20 @@ public function wizardCompleted($sender, $param)
'Job',
$job['Name']
];
$result = $this->getModule('api')->create(
$params,
['config' => json_encode($job)]
);

$result = (object) ['error' => -1, 'output' => ''];
if ($this->WhatToDoWithVirtualFullNewJob->Checked) {
$result = $this->getModule('api')->create(
$params,
['config' => json_encode($job)]
);
} elseif ($this->WhatToDoWithVirtualFullExistingJob->Checked) {

$result = $this->getModule('api')->set(
$params,
['config' => json_encode($job)]
);
}
if ($result->error === 0) {
$this->getModule('api')->set(['console'], ['reload']);
$this->getModule('audit')->audit(
Expand Down

0 comments on commit da75b27

Please sign in to comment.