fix: [enrichment] Made the payload of the API enriching an event with a list of modules a bit more lax

pull/3711/head
iglocska 2018-09-23 15:21:13 +02:00
parent 551f168171
commit 072f85fe66
1 changed files with 3 additions and 0 deletions

View File

@ -5219,6 +5219,9 @@ class EventsController extends AppController
$this->Event->insertLock($this->Auth->user(), $event['Event']['id']);
if ($this->request->is('post')) {
$modules = array();
if (!isset($this->request->data['Event'])) {
$this->request->data = array('Event' => $this->request->data);
}
foreach ($this->request->data['Event'] as $module => $enabled) {
if ($enabled) {
$modules[] = $module;