Cart Manager: Fix counting of bundled items

This commit is contained in:
Raphael Michel
2021-05-18 12:14:22 +02:00
parent b3e14be6ed
commit 35c6975270

View File

@@ -842,8 +842,12 @@ class CartManager:
for op in self._operations:
if isinstance(op, self.AddOperation):
items[op.item] += op.count
for bo in op.bundled:
items[bo.item] += bo.count
elif isinstance(op, self.RemoveOperation):
items[op.position.item] -= 1
for a in op.position.addons.all():
items[a.item] -= 1
err = None
for item, count in items.items():