[-] WS: Sanity check before creating packs

As it is before this commit, every product that is created from the
schema without removing the empty bundle item in the schema will become
a pack containing one broken item.

Sorry, this bug was introduced by my previous pull request.
This commit is contained in:
Corentin Delcourt
2013-07-25 14:45:17 +02:00
parent b4d3b631ad
commit 53526304a5
+2 -1
View File
@@ -5377,7 +5377,8 @@ class ProductCore extends ObjectModel
Pack::deleteItems($this->id);
foreach ($items as $item)
Pack::addItem($this->id, (int)$item['id'], (int)$item['quantity']);
if((int)$item['id'] > 0)
Pack::addItem($this->id, (int)$item['id'], (int)$item['quantity']);
return true;
}
}