This really shouldn't be here

This commit is contained in:
Samuel Georges 2015-07-25 14:19:34 +10:00
parent ea686ab120
commit 3866ccbb20

View File

@ -617,9 +617,8 @@ class RelationController extends ControllerBehavior
* Single (belongs to, has one)
*/
elseif ($this->viewMode == 'single') {
$query = $this->relationObject;
$this->controller->relationExtendQuery($query, $this->field);
$this->viewModel = $query->getResults() ?: $this->relationModel;
$this->viewModel = $this->relationObject->getResults()
?: $this->relationModel;
$config = $this->makeConfigForMode('view', 'form');
$config->model = $this->viewModel;