mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #8870 from jinjie/4
Fix: Allow editing of relation if item is created.
This commit is contained in:
commit
ec51f98adb
@ -207,7 +207,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
|
||||
|
||||
// If we are creating a new record in a has-many list, then
|
||||
// Disable the form field as it has no effect.
|
||||
if ($list instanceof HasManyList) {
|
||||
if ($list instanceof HasManyList && !$this->record->isInDB()) {
|
||||
$key = $list->getForeignKey();
|
||||
|
||||
if ($field = $fields->dataFieldByName($key)) {
|
||||
|
Loading…
Reference in New Issue
Block a user