fix: Incomplete assets cause manage Trash to fail, added test for valid object creation
This commit is contained in:
parent
8bac5fd39a
commit
7a4a0be5d4
1 changed files with 6 additions and 1 deletions
|
|
@ -79,7 +79,12 @@ sub getAssetsInTrash {
|
|||
assetData.title desc
|
||||
");
|
||||
while (my ($id, $date, $class) = $sth->array) {
|
||||
push(@assets, WebGUI::Asset->new($self->session,$id,$class,$date));
|
||||
my $asset = WebGUI::Asset->new($self->session,$id,$class,$date);
|
||||
if ($asset){
|
||||
push(@assets, $asset);
|
||||
}else{
|
||||
$self->session->errorHandler->error("AssetTrash::getAssetsInTrash - failed to instanciate asset with assetId $id, className $class, and revisionDate $date");
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
return \@assets;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue