Dereference the array ref of collateral into an array so foreach
can iterate over it.
This commit is contained in:
parent
135d8f5257
commit
dec515d1cf
1 changed files with 1 additions and 1 deletions
|
|
@ -81,7 +81,7 @@ sub repairBrokenProductSkus {
|
|||
print "\tRepairing broken Products that were imported... " unless $quiet;
|
||||
my $getAProduct = WebGUI::Asset::Sku::Product->getIsa($session);
|
||||
while (my $product = $getAProduct->()) {
|
||||
COLLATERAL: foreach my $collateral ($product->getAllCollateral('variantsJSON')) {
|
||||
COLLATERAL: foreach my $collateral (@{ $product->getAllCollateral('variantsJSON') }) {
|
||||
next COLLATERAL unless exists $collateral->{sku};
|
||||
$collateral->{varSku} = $collateral->{sku};
|
||||
delete $collateral->{sku};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue