fix: [internal] if no attribute distribution is found in the event edits, set the default instead of defaulting to 0

pull/3912/head
iglocska 2018-11-29 15:33:45 +01:00
parent 430ddcd79c
commit 665b6ccbae
1 changed files with 6 additions and 1 deletions

View File

@ -3628,7 +3628,12 @@ class Attribute extends AppModel
));
return 'Invalid sharing group choice.';
}
}
} else if (!isset($attribute['distribution'])) {
$attribute['distribution'] = Configure::read('MISP.default_attribute_distribution');
if ($attribute['distribution'] == 'event') {
$attribute['distribution'] = 5;
}
}
$fieldList = array(
'event_id',
'category',