mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix: Don't validate input again upon running a task
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
aaa8af4b49
commit
46c518f712
1 changed files with 0 additions and 7 deletions
|
|
@ -1052,15 +1052,8 @@ class Manager implements IManager {
|
|||
public function prepareInputData(Task $task): array {
|
||||
$taskTypes = $this->getAvailableTaskTypes();
|
||||
$inputShape = $taskTypes[$task->getTaskTypeId()]['inputShape'];
|
||||
$inputShapeDefaults = $taskTypes[$task->getTaskTypeId()]['inputShapeDefaults'];
|
||||
$inputShapeEnumValues = $taskTypes[$task->getTaskTypeId()]['inputShapeEnumValues'];
|
||||
$optionalInputShape = $taskTypes[$task->getTaskTypeId()]['optionalInputShape'];
|
||||
$optionalInputShapeEnumValues = $taskTypes[$task->getTaskTypeId()]['optionalInputShapeEnumValues'];
|
||||
$optionalInputShapeDefaults = $taskTypes[$task->getTaskTypeId()]['optionalInputShapeDefaults'];
|
||||
$input = $task->getInput();
|
||||
// validate input, again for good measure (should have been validated in scheduleTask)
|
||||
$this->validateInput($inputShape, $inputShapeDefaults, $inputShapeEnumValues, $input);
|
||||
$this->validateInput($optionalInputShape, $optionalInputShapeDefaults, $optionalInputShapeEnumValues, $input, true);
|
||||
$input = $this->removeSuperfluousArrayKeys($input, $inputShape, $optionalInputShape);
|
||||
$input = $this->fillInputFileData($task->getUserId(), $input, $inputShape, $optionalInputShape);
|
||||
return $input;
|
||||
|
|
|
|||
Loading…
Reference in a new issue