FIX Only reload data for a item edited through a GridField if the record exists. Fix 7721

This commit is contained in:
jean 2012-08-01 20:15:15 +12:00 committed by Will Rossiter
parent fb9e997b5e
commit 90b0fe8db7

View File

@ -316,7 +316,9 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler {
$actions,
$this->component->getValidator()
);
$form->loadDataFrom($this->record);
if($this->record->ID !== 0) {
$form->loadDataFrom($this->record);
}
// TODO Coupling with CMS
$toplevelController = $this->getToplevelController();