fix: [internal] fixed newly introduced error with full_group_by directive when adding galaxies to tag collections

pull/5488/head
iglocska 2019-12-19 09:27:44 +01:00
parent 8a96ab1270
commit 6756badac8
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 3 additions and 3 deletions

View File

@ -114,9 +114,9 @@ class GalaxiesController extends AppController
$conditions = $namespace === '0' ? array() : array('namespace' => $namespace); $conditions = $namespace === '0' ? array() : array('namespace' => $namespace);
$galaxies = $this->Galaxy->find('all', array( $galaxies = $this->Galaxy->find('all', array(
'recursive' => -1, 'recursive' => -1,
'fields' => array('MAX(Galaxy.version) as latest_version', '*'), 'fields' => array('MAX(Galaxy.version) as latest_version', 'id', 'kill_chain_order', 'name', 'icon', 'description'),
'conditions' => $conditions, 'conditions' => $conditions,
'group' => array('name'), 'group' => array('name', 'id', 'kill_chain_order', 'icon', 'description'),
'order' => array('name asc') 'order' => array('name asc')
)); ));
$items = array( $items = array(

View File

@ -383,7 +383,7 @@ class Galaxy extends AppModel
'Galaxy.type' => $type, 'Galaxy.type' => $type,
'Galaxy.namespace' => $namespace 'Galaxy.namespace' => $namespace
), ),
'group' => array('name') 'group' => array('name', 'id')
)); ));
return empty($galaxy) ? 0 : $galaxy['Galaxy']['id']; return empty($galaxy) ? 0 : $galaxy['Galaxy']['id'];
} }