fixed #10544: Child assets under uncommitted parents

This commit is contained in:
Doug Bell 2009-10-02 01:03:34 -05:00
parent 8f7d01691d
commit 5c03cfbfbe
4 changed files with 65 additions and 38 deletions

View file

@ -85,7 +85,8 @@ sub addChild {
$properties->{assetId} = $id;
$properties->{parentId} = $self->getId;
my $temp = WebGUI::Asset->newByPropertyHashRef($self->session,$properties) || croak "Couldn't create a new $properties->{className} asset!";
$temp->{_parent} = $self;
# Do not set the parent here, since it could be stale and poison the child
#$temp->{_parent} = $self;
my $newAsset = $temp->addRevision($properties, $now, $options);
$self->updateHistory("added child ".$id);
$self->session->http->setStatus(201,"Asset Creation Successful");