Throw an exception in Nesed Gridfield if an invalid relation is configured.
This commit is contained in:
parent
1993acba3a
commit
9ab3ed67a7
|
@ -215,7 +215,7 @@ class GridFieldNestedForm extends AbstractGridFieldComponent implements
|
|||
$this->gridField = $gridField;
|
||||
$relationName = $this->getRelationName();
|
||||
if (!$record->hasMethod($relationName)) {
|
||||
return '';
|
||||
throw new Exception('Invalid relation name');
|
||||
}
|
||||
if ($this->canExpandCallback) {
|
||||
if (is_callable($this->canExpandCallback)
|
||||
|
|
Loading…
Reference in New Issue