mirror of https://github.com/MISP/MISP
chg: [internal] SaveMany for Event::add_original_file
parent
9e0c36ff2a
commit
f99f82fa34
|
@ -7218,9 +7218,8 @@ class Event extends AppModel
|
|||
'disable_correlation' => true
|
||||
)
|
||||
);
|
||||
foreach ($attributes as $attribute) {
|
||||
$this->Attribute->create();
|
||||
$this->Attribute->save($attribute);
|
||||
if (!$this->Attribute->saveMany($attributes)) {
|
||||
throw new Exception("Could not save attributes for original file because of validation errors:" . json_encode($this->Attribute->validationErrors));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue