fix: [sighting] Grouping sighting fetch for tags

pull/6789/head
Jakub Onderka 2020-12-22 15:29:08 +01:00
parent 9fb2b15c90
commit 0c722243e5
1 changed files with 1 additions and 1 deletions

View File

@ -365,7 +365,7 @@ class Sighting extends AppModel
'contain' => [ucfirst($context) . 'Tag'],
'conditions' => $conditions,
'fields' => [ucfirst($context) . 'Tag.tag_id', 'date', 'sighting_count'],
'group' => [ucfirst($context) . 'Tag.id', 'date'],
'group' => [ucfirst($context) . 'Tag.tag_id', 'date'],
'order' => ['date'], // from oldest
]);
unset($this->virtualFields['date'], $this->virtualFields['sighting_count']);