Fix call len for a float value.

This commit is contained in:
Sergio Morillo 2020-03-12 15:31:54 +01:00
parent bc10ad497e
commit df0b12e429
1 changed files with 2 additions and 2 deletions

View File

@ -153,8 +153,8 @@ class LoadOrder(metaclass=PoolMeta):
not self.load.ul_quantity):
return 0
return self.load.currency.round(
(Decimal(len(self.ul_quantity)) / Decimal(len(
self.load.ul_quantity))) * self.load.unit_price)
(Decimal(self.ul_quantity) / Decimal(
self.load.ul_quantity)) * self.load.unit_price)
@classmethod
def cancel(cls, records):