fix(Manager#fillInputData): Load user folder if needed

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
pull/45094/head
Marcel Klehr 3 weeks ago
parent 715245a21a
commit e4b1d23768

@ -749,7 +749,11 @@ class Manager implements IManager {
* @throws NotPermittedException
* @throws ValidationException
*/
public function fillInputFileData(array $input, ...$specs): array {
public function fillInputFileData(?string $userId, array $input, ...$specs): array {
if ($userId !== null) {
// load user folder for later
$this->rootFolder->getUserFolder($userId);
}
$newInputOutput = [];
$spec = array_reduce($specs, fn ($carry, $spec) => $carry + $spec, []);
foreach($spec as $key => $descriptor) {
@ -886,7 +890,7 @@ class Manager implements IManager {
$this->validateInput($inputShape, $input);
$this->validateInput($optionalInputShape, $input, true);
$input = $this->removeSuperfluousArrayKeys($input, $inputShape, $optionalInputShape);
$input = $this->fillInputFileData($input, $inputShape, $optionalInputShape);
$input = $this->fillInputFileData($task->getUserId(), $input, $inputShape, $optionalInputShape);
return $input;
}
}

Loading…
Cancel
Save