fix: Returning tags & galaxies from module results

pull/4584/head
chrisr3d 2019-06-07 15:32:03 +02:00
parent 25f6c41444
commit 861d2d7d6a
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 5 additions and 2 deletions

View File

@ -5265,7 +5265,6 @@ class Event extends AppModel
$attributes[] = $tmp_attribute;
}
$event['Attribute'] = $attributes;
unset($result['results']['Attribute']);
}
if (!empty($result['results']['Object'])) {
$object = array();
@ -5280,7 +5279,11 @@ class Event extends AppModel
$objects[] = $tmp_object;
}
$event['Object'] = $objects;
unset($result['results']['Object']);
}
foreach (array('Tag', 'Galaxy') as $field) {
if (!empty($result['results'][$field])) {
$event[$field] = $result['results'][$field];
}
}
return $event;
}