duplicateBranch copies source and then sets parent to the destination
This commit is contained in:
parent
3f55240237
commit
d669e20083
2 changed files with 5 additions and 1 deletions
|
|
@ -51,7 +51,8 @@ The asset to duplicate. Defaults to self.
|
|||
sub duplicateBranch {
|
||||
my $self = shift;
|
||||
my $assetToDuplicate = shift || $self;
|
||||
my $newAsset = $self->duplicate($assetToDuplicate);
|
||||
my $newAsset = $assetToDuplicate->duplicate();
|
||||
$newAsset->setParent($self);
|
||||
my $contentPositions;
|
||||
$contentPositions = $assetToDuplicate->get("contentPositions");
|
||||
foreach my $child (@{$assetToDuplicate->getLineage(["children"],{returnObjects=>1})}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue