From e3ba89ba741da1190e7001842fd5f8b12e31ce05 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 18 Jul 2015 08:47:02 +1000 Subject: [PATCH] List columns don't support morphTo (yet) --- modules/backend/widgets/Lists.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index 63e1f53fa..d3fdfa3ff 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -415,8 +415,14 @@ class Lists extends WidgetBase * Relation column */ if (isset($column->relation)) { - $table = $this->model->makeRelation($column->relation)->getTable(); + + // @todo Find a way... $relationType = $this->model->getRelationType($column->relation); + if ($relationType == 'morphTo') { + throw new ApplicationException('The relationship morphTo is not supported for list columns.'); + } + + $table = $this->model->makeRelation($column->relation)->getTable(); $sqlSelect = $this->parseTableName($column->sqlSelect, $table); /*