chg: [bulk update] simplified

pull/9438/head v2.4.179
iglocska 2023-11-25 11:42:28 +01:00
parent 1de6b9ec04
commit 5ec0ac952d
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
3 changed files with 4 additions and 4 deletions

View File

@ -2696,8 +2696,10 @@ class Attribute extends AppModel
}
$saveOptions['validate'] = false;
// actual save, though we still need to validate in order for the beforeValidate massaging scripts to fire.
$this->saveMany($attributes, $saveOptions);
return true;
if (!empty($attributes)) {
$this->saveMany($attributes, $saveOptions);
}
return $this->editAttributePostProcessing($attributes, $event, $user);
}
public function editAttributePostProcessing($attributes, $event, $user)

View File

@ -4127,7 +4127,6 @@ class Event extends AppModel
}
}
$this->Attribute->editAttributeBulk($attributes, $saveResult, $user);
$this->Attribute->editAttributePostProcessing($attributes, $saveResult, $user);
}
if (isset($data['Event']['Object'])) {
$data['Event']['Object'] = array_values($data['Event']['Object']);

View File

@ -51,7 +51,6 @@ class Module_attribute_edition_operation extends WorkflowBaseActionModule
}
}
$this->Attribute->editAttributeBulk($attributes, $rData, $user);
$this->Attribute->editAttributePostProcessing($attributes, $rData, $user);
foreach ($attributes as $k => $attribute) {
$saveSuccess = empty($this->Attribute->validationErrors[$k]);
if ($saveSuccess) {