Only log products that aren't defined in the Shelf. fix 10902

This commit is contained in:
Colin Kuskie 2009-09-04 11:35:57 -07:00
parent c7eacad029
commit 20c19425eb
2 changed files with 5 additions and 5 deletions

View file

@ -311,12 +311,11 @@ sub view {
my @products = ();
PRODUCT: foreach my $id (@productIds) {
my $asset = WebGUI::Asset->newByDynamicClass($session, $id);
if (defined $asset && $asset->canView) {
push @products, $asset;
}
else {
if (!defined $asset) {
$session->errorHandler->error(q|Couldn't instanciate SKU with assetId |.$id.q| on shelf with assetId |.$self->getId);
}
next PRODUCT;
}
push @products, $asset if $asset->canView;
}
# create paginator