fix: [Objects] Adding an object would not unpublish the event

pull/3766/head
iglocska 2018-10-08 21:38:47 +02:00
parent e08f1e2f4b
commit 8c450da4b5
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ class ObjectsController extends AppController
}
if ($error === true) {
$result = $this->MispObject->saveObject($object, $eventId, $template, $this->Auth->user(), $errorBehaviour = 'halt');
if ($result === true) {
if (is_numeric($result)) {
$this->MispObject->Event->unpublishEvent($eventId);
}
} else {