Skip to content

Commit

Permalink
Fix issue #30 - Paste into in tree mode does not check for top position.
Browse files Browse the repository at this point in the history
  • Loading branch information
discordier committed Jul 14, 2014
1 parent 6d9ae4c commit 7785259
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,14 @@ protected function createEditMask($model, $originalModel, $preFunction, $postFun
$parentFetchConfig->setId($into->getId());
$parentModel = $parentDataProvider->fetch($parentFetchConfig);

$controller->pasteInto($parentModel, $models, $this->getManualSortingProperty());
if ($parentModel)
{
$controller->pasteInto($parentModel, $models, $this->getManualSortingProperty());
}
else
{
$controller->pasteTop($models, $this->getManualSortingProperty());
}
}
else
{
Expand Down

0 comments on commit 7785259

Please sign in to comment.