Throw 404 error on grid field nested form move-to-parent action,
if no record is found.
This commit is contained in:
parent
8f505659f0
commit
a9b0a70155
|
@ -288,7 +288,7 @@ class GridFieldNestedForm extends AbstractGridFieldComponent implements
|
||||||
$list = $gridField->getList();
|
$list = $gridField->getList();
|
||||||
$id = isset($move['id']) ? (int) $move['id'] : null;
|
$id = isset($move['id']) ? (int) $move['id'] : null;
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
throw new HTTPResponse_Exception('Missing ID', 400);
|
throw new HTTPResponse_Exception('Missing ID', 404);
|
||||||
}
|
}
|
||||||
$to = isset($move['parent']) ? (int)$move['parent'] : null;
|
$to = isset($move['parent']) ? (int)$move['parent'] : null;
|
||||||
// should be possible either on parent or child grid field, or nested grid field from parent
|
// should be possible either on parent or child grid field, or nested grid field from parent
|
||||||
|
|
Loading…
Reference in New Issue