mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-06-23 04:59:19 +02:00
Throw exception in nested gridfields if the relation is invalid.
This commit is contained in:
parent
5e6097214e
commit
bc1180b62c
|
@ -409,7 +409,7 @@ class GridFieldNestedForm extends AbstractGridFieldComponent implements
|
|||
}
|
||||
$relationName = $this->getRelationName();
|
||||
if (!$record->hasMethod($relationName)) {
|
||||
return '';
|
||||
throw new Exception('Invalid relation name');
|
||||
}
|
||||
$manager = $this->getStateManager();
|
||||
$stateRequest = $request ?: $gridField->getForm()->getRequestHandler()->getRequest();
|
||||
|
|
Loading…
Reference in New Issue
Block a user