Re: New commit
Mike Heins <[email protected]>
| Newsgroups | gmane.comp.web.interchange.users |
|---|---|
| Message-ID | <[email protected]> |
On 06/14/2017 11:35 AM, David Christensen wrote: > interchange-users: > > This was on my IC branch as a bug fix for a client but I wasn't sure if there might be other implications here; anyone think this would break things for them? > > Best, > > David > ---- > commit 2163a7c222a9b93fc50d925e77770353c186f477 > Author: David Christensen <[email protected]> > Date: Fri Feb 24 16:08:32 2017 -0600 > > Early exit from find_options_type if no sku provided > > diff --git a/lib/Vend/Options.pm b/lib/Vend/Options.pm > index 3d0d898..1de47ab 100644 > --- a/lib/Vend/Options.pm > +++ b/lib/Vend/Options.pm > @@ -68,6 +68,8 @@ sub find_options_type { > > my $sku = $item->{mv_sku} || $item->{code}; > > + return unless defined $sku && $sku ne ''; > + > $opt = get_option_hash($opt); > > my $module; Looks valid to me. I see no cases where we want to enable a product record with the empty string as the SKU.