Permalink
Browse files

FIX Only reload data for a item edited through a GridField if the rec…

…ord exists. Fix 7721
  • Loading branch information...
1 parent fb9e997 commit 90b0fe8db7fe16c2cd4a13c7f3cfb467ebcd86ac @patbolo patbolo committed with wilr Aug 1, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 forms/gridfield/GridFieldDetailForm.php
@@ -316,7 +316,9 @@ function ItemEditForm() {
$actions,
$this->component->getValidator()
);
- $form->loadDataFrom($this->record);
+ if($this->record->ID !== 0) {
+ $form->loadDataFrom($this->record);
+ }
// TODO Coupling with CMS
$toplevelController = $this->getToplevelController();

0 comments on commit 90b0fe8

Please sign in to comment.