mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix: Allow editing of relation if item is created.
This commit is contained in:
parent
6b450395ce
commit
1d406c64b9
@ -206,7 +206,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