mirror of https://github.com/MISP/MISP
Merge pull request #6091 from JakubOnderka/existence-checking
fix: [internal] Do not check event existence twicepull/6113/head
commit
9f8a198eaa
|
@ -1581,9 +1581,6 @@ class EventsController extends AppController
|
|||
// find the id of the event, change $id to it and proceed to read the event as if the ID was entered.
|
||||
$id = $this->Toolbox->findIdByUuid($this->Event, $id);
|
||||
$this->Event->id = $id;
|
||||
if (!$this->Event->exists()) {
|
||||
throw new NotFoundException(__('Invalid event'));
|
||||
}
|
||||
$conditions = array('eventid' => $id);
|
||||
if (!$this->_isRest()) {
|
||||
$conditions['includeAllTags'] = true;
|
||||
|
@ -2535,9 +2532,6 @@ class EventsController extends AppController
|
|||
{
|
||||
$id = $this->Toolbox->findIdByUuid($this->Event, $id);
|
||||
$this->Event->id = $id;
|
||||
if (!$this->Event->exists()) {
|
||||
throw new NotFoundException(__('Invalid event'));
|
||||
}
|
||||
$this->Event->recursive = -1;
|
||||
$event = $this->Event->read(null, $id);
|
||||
if (!$this->_isSiteAdmin()) {
|
||||
|
@ -2638,9 +2632,6 @@ class EventsController extends AppController
|
|||
{
|
||||
$id = $this->Toolbox->findIdByUuid($this->Event, $id);
|
||||
$this->Event->id = $id;
|
||||
if (!$this->Event->exists()) {
|
||||
throw new NotFoundException(__('Invalid event'));
|
||||
}
|
||||
// update the event and set the from field to the current instance's organisation from the bootstrap. We also need to save id and info for the logs.
|
||||
$this->Event->recursive = -1;
|
||||
$event = $this->Event->read(null, $id);
|
||||
|
|
Loading…
Reference in New Issue