Skip to content

Commit

Permalink
Make getPrototypeList catch exceptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
perlDreamer committed Oct 16, 2011
1 parent e5d4664 commit 71533cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/WebGUI/Asset.pm
Expand Up @@ -1604,8 +1604,8 @@ sub getPrototypeList {
my $userUiLevel = $session->user->get('uiLevel');
my @assets;
ID: foreach my $id (@prototypeIds) {
my $asset = WebGUI::Asset->newById($session, $id);
next ID unless defined $asset;
my $asset = eval { WebGUI::Asset->newById($session, $id); };
next ID if Exception::Class->caught();
next ID unless $asset->get('isPrototype');
next ID unless ($asset->get('status') eq 'approved' || $asset->get('tagId') eq $session->scratch->get("versionTag"));
push @assets, $asset;
Expand Down

0 comments on commit 71533cb

Please sign in to comment.