Commit ebc161b4 authored by Vincent Pelletier's avatar Vincent Pelletier

InventoryLine: Simplify getQuantity.

parent 8f3b7751
......@@ -88,9 +88,8 @@ class InventoryLine(DeliveryLine):
if quantity not in (0.0,0,None):
return quantity
# Make sure inventory is defined somewhere (here or parent)
_marker = []
inventory = getattr(aq_base(self), 'inventory', _marker)
if inventory is not _marker and inventory is not None:
inventory = getattr(aq_base(self), 'inventory', None)
if inventory is not None:
return inventory
return quantity
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment