fix: [sighting] Return just requested sighting

pull/8720/head
Jakub Onderka 2022-10-29 10:46:31 +02:00
parent 338de3178c
commit 1bc02930cf
1 changed files with 2 additions and 1 deletions

View File

@ -232,6 +232,7 @@ class Sighting extends AppModel
return [];
}
$conditions['Sighting.id'] = $ids;
$sightings = $this->find('all', [
'recursive' => -1,
'conditions' => $conditions,
@ -1508,7 +1509,7 @@ class Sighting extends AppModel
}
return $this->Organisation->find('list', [
'fields' => ['Organisation.uuid', 'Organisation.id'],
'conditions' => ['Organisation.uuid' => array_unique(array_column($organisations, 'uuid'))],
'conditions' => ['Organisation.uuid' => array_unique(array_column($organisations, 'uuid'), SORT_REGULAR)],
]);
}