Skip to content

Commit

Permalink
Redirect to the new record
Browse files Browse the repository at this point in the history
  • Loading branch information
uniun committed Nov 14, 2014
1 parent ae03aba commit e2d79f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/GridFieldDetailFormCustom.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class GridFieldDetailFormCustom_ItemRequest extends GridFieldDetailForm_ItemRequ
function copy($request) {
$current_record = $this->record;
$clone = $this->record->duplicate();
$this->record = $clone;
if (!$clone || $clone->ID < 1) {
user_error("Error Duplicating!",
E_USER_ERROR);
}

return Controller::curr()->redirect($this->Link('edit'));
}

Expand Down

0 comments on commit e2d79f5

Please sign in to comment.