diff --git a/lib/WebGUI/Keyword.pm b/lib/WebGUI/Keyword.pm index c0a2e4936..a7490a968 100644 --- a/lib/WebGUI/Keyword.pm +++ b/lib/WebGUI/Keyword.pm @@ -128,7 +128,10 @@ sub findKeywords { $parentAsset = $options->{asset}; } if ($options->{assetId}) { - $parentAsset = WebGUI::Asset->new($self->session, $options->{assetId}); + $parentAsset = eval { WebGUI::Asset->newById($self->session, $options->{assetId}); }; + if (Exception::Class->caught()) { + $self->session->log->error("Keywords: error instanciating parentAsset by assetId ". $options->{assetId}.": $@"); + } } if ($parentAsset) { $sql .= ' INNER JOIN asset USING (assetId)';