Trap calls to newById inside getParent. StoryArchive should use cloneFromDb.
This commit is contained in:
parent
d758bceea2
commit
3e168b1c87
2 changed files with 2 additions and 2 deletions
|
|
@ -306,7 +306,7 @@ sub getFolder {
|
||||||
$oldVersionTag->setWorking() if $oldVersionTag;
|
$oldVersionTag->setWorking() if $oldVersionTag;
|
||||||
|
|
||||||
##Get a new version of the asset from the db with the correct state
|
##Get a new version of the asset from the db with the correct state
|
||||||
$folder = WebGUI::Asset->newByUrl($session, $folderUrl);
|
$folder = $folder->cloneFromDb();
|
||||||
return $folder;
|
return $folder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -733,7 +733,7 @@ sub getParent {
|
||||||
return $self if ($self->getId eq "PBasset000000000000001");
|
return $self if ($self->getId eq "PBasset000000000000001");
|
||||||
|
|
||||||
unless ( $self->{_parent} ) {
|
unless ( $self->{_parent} ) {
|
||||||
$self->{_parent} = WebGUI::Asset->newById($self->session,$self->parentId);
|
$self->{_parent} = eval { WebGUI::Asset->newById($self->session, $self->parentId); };
|
||||||
}
|
}
|
||||||
|
|
||||||
return $self->{_parent};
|
return $self->{_parent};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue