From 1d406c64b99065461f4fdd47e8731e36b1fa7944 Mon Sep 17 00:00:00 2001 From: Kong Jin Jie Date: Wed, 20 Mar 2019 12:51:49 +0800 Subject: [PATCH] Fix: Allow editing of relation if item is created. --- src/Forms/GridField/GridFieldDetailForm_ItemRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Forms/GridField/GridFieldDetailForm_ItemRequest.php b/src/Forms/GridField/GridFieldDetailForm_ItemRequest.php index a07cf8bac..e30ed3bcc 100644 --- a/src/Forms/GridField/GridFieldDetailForm_ItemRequest.php +++ b/src/Forms/GridField/GridFieldDetailForm_ItemRequest.php @@ -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)) {