fix: [objects] breakonduplicate fixed

pull/6434/merge
iglocska 2021-01-12 13:06:52 +01:00
parent ee492539a3
commit 68596db5be
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 2 additions and 2 deletions

View File

@ -318,7 +318,7 @@ class MispObject extends AppModel
)
),
'fields' => array('template_uuid'),
'conditions' => array('template_uuid' => $object['Object']['template_uuid'], 'Object.deleted' => 0)
'conditions' => array('template_uuid' => $object['Object']['template_uuid'], 'Object.deleted' => 0, 'event_id' => $eventId)
));
$oldObjects = array();
foreach ($existingObjects as $k => $existingObject) {
@ -327,7 +327,7 @@ class MispObject extends AppModel
foreach ($existingObject['Attribute'] as $existingAttribute) {
$temp[] = hash(
'sha256',
$attribute['object_relation'] . $existingAttribute['category'] . $existingAttribute['type'] . $existingAttribute['value']
$existingAttribute['object_relation'] . $existingAttribute['category'] . $existingAttribute['type'] . $existingAttribute['value']
);
}
if (empty(array_diff($temp, $newObjectAttributes))) {