Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…ord exists. Fix 7721
  • Loading branch information...
commit 90b0fe8db7fe16c2cd4a13c7f3cfb467ebcd86ac 1 parent fb9e997
@patbolo patbolo authored wilr committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 forms/gridfield/GridFieldDetailForm.php
View
4 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.
Something went wrong with that request. Please try again.