mirror of https://github.com/MISP/MISP
parent
1de6b9ec04
commit
5ec0ac952d
|
@ -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)
|
||||
|
|
|
@ -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']);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue