fix: [API] get organisation by uuid for sightings/listSightings, fixes #4992

pull/5005/head
iglocska 2019-08-14 15:08:19 +02:00
parent eb4e5bf765
commit 60e68d1459
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 2 additions and 0 deletions

View File

@ -338,6 +338,8 @@ class SightingsController extends AppController
'Sighting.' . $context . '_id' => $id
);
if ($org_id) {
$this->loadModel('Organisation');
$org_id = $this->Toolbox->findIdByUuid($this->Organisation, $org_id);
$conditions[] = array('Sighting.org_id' => $org_id);
}
$sightings = $this->Sighting->find('all', array(