better backword compatibility: ignore product options if not present
This commit is contained in:
parent
620bf6fe25
commit
81d17e8966
1 changed files with 4 additions and 3 deletions
|
@ -116,8 +116,9 @@ class OrderItems(object):
|
|||
|
||||
def add(self, product, party, shop, order='???', run=0, **kw):
|
||||
kw['shop'] = self.getUid(shop)
|
||||
options = kw.get('options', [])
|
||||
existing = self.getCart(party, order, shop, run, product=product)
|
||||
options = kw.get('options')
|
||||
if options is not None:
|
||||
existing = [item for item in existing
|
||||
if (item.data.get('options') or []) == options]
|
||||
if existing:
|
||||
|
|
Loading…
Add table
Reference in a new issue