mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
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;
|
$this->gridField = $gridField;
|
||||||
$relationName = $this->getRelationName();
|
$relationName = $this->getRelationName();
|
||||||
if (!$record->hasMethod($relationName)) {
|
if (!$record->hasMethod($relationName)) {
|
||||||
return '';
|
throw new Exception('Invalid relation name');
|
||||||
}
|
}
|
||||||
if ($this->canExpandCallback) {
|
if ($this->canExpandCallback) {
|
||||||
if (is_callable($this->canExpandCallback)
|
if (is_callable($this->canExpandCallback)
|
||||||
|
Loading…
Reference in New Issue
Block a user