Update Shop for new instanciators and for exception handling.
This commit is contained in:
parent
03427eed10
commit
ecc71d455d
6 changed files with 16 additions and 10 deletions
|
|
@ -132,8 +132,8 @@ Returns an instanciated WebGUI::Asset::Sku object for this item.
|
|||
|
||||
sub getSku {
|
||||
my ($self) = @_;
|
||||
my $asset = WebGUI::Asset->newById($self->transaction->session, $self->get("assetId"));
|
||||
if (defined $asset) {
|
||||
my $asset = eval { WebGUI::Asset->newById($self->transaction->session, $self->get("assetId")); };
|
||||
if (Exception::Class->caught()) {
|
||||
$asset->applyOptions($self->get("options"));
|
||||
return $asset;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue