fix: [galaxyClusters:index] Apply find on correct model for REST

requests
pull/6120/head
mokaddem 2020-11-12 09:42:12 +01:00
parent 97d38eaaa5
commit 63d3cf39e6
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ class GalaxyClustersController extends AppController
$searchConditions['GalaxyCluster.galaxy_id'] = $galaxyId;
if ($this->_isRest()) {
$clusters = $this->Galaxy->find(
$clusters = $this->GalaxyCluster->find(
'all',
array(
'conditions' => array(
@ -91,7 +91,7 @@ class GalaxyClustersController extends AppController
),
)
);
return $this->RestResponse->viewData($galaxies, $this->response->type());
return $this->RestResponse->viewData($clusters, $this->response->type());
} else {
$this->paginate['conditions']['AND'][] = $contextConditions;
$this->paginate['conditions']['AND'][] = $searchConditions;