Fix newByPropertyHashRef, which is required for class dispatch. Add tests. Fix addChild to use newByPropertyHashRef.
This commit is contained in:
parent
36d1636f06
commit
caa1f330b8
3 changed files with 19 additions and 9 deletions
|
|
@ -85,7 +85,7 @@ sub addChild {
|
|||
$session->db->commit;
|
||||
$properties->{assetId} = $id;
|
||||
$properties->{parentId} = $self->getId;
|
||||
my $temp = WebGUI::Asset->new($session,$properties) || croak "Couldn't create a new $properties->{className} asset!";
|
||||
my $temp = WebGUI::Asset->newByPropertyHashRef($session, $properties) || croak "Couldn't create a new $properties->{className} asset!";
|
||||
my $newAsset = $temp->addRevision($properties, $now, $options);
|
||||
$self->updateHistory("added child ".$id);
|
||||
$session->http->setStatus(201,"Asset Creation Successful");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue