mirror of https://github.com/MISP/MISP
fix: Added event_uuid to attribute view
parent
04ef84a0cf
commit
a2d401ab50
|
@ -883,6 +883,7 @@ class AttributesController extends AppController {
|
|||
if ($this->_isRest()) {
|
||||
$conditions = array('conditions' => array('Attribute.id' => $id), 'withAttachments' => true);
|
||||
$conditions['includeAllTags'] = false;
|
||||
$conditions['includeAttributeUuid'] = true;
|
||||
$attribute = $this->Attribute->fetchAttributes($this->Auth->user(), $conditions);
|
||||
if (empty($attribute)) throw new MethodNotAllowedException('Invalid attribute');
|
||||
$attribute = $attribute[0];
|
||||
|
|
|
@ -2237,7 +2237,7 @@ class Attribute extends AppModel {
|
|||
'recursive' => -1,
|
||||
'contain' => array(
|
||||
'Event' => array(
|
||||
'fields' => array('id', 'info', 'org_id', 'orgc_id'),
|
||||
'fields' => array('id', 'info', 'org_id', 'orgc_id', 'uuid'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -2294,6 +2294,9 @@ class Attribute extends AppModel {
|
|||
unset($results[$key]);
|
||||
continue;
|
||||
}
|
||||
if (!empty($options['includeAttributeUuid'])) {
|
||||
$results[$key]['Attribute']['event_uuid'] = $results[$key]['Event']['uuid'];
|
||||
}
|
||||
if ($proposals_block_attributes) {
|
||||
if (!empty($attribute['ShadowAttribute'])) {
|
||||
unset($results[$key]);
|
||||
|
|
Loading…
Reference in New Issue