Fix rendering bug when price.multiple is null

This commit is contained in:
Lance Edgar 2019-03-27 19:39:58 -05:00
parent a139d9c844
commit d20d22ffb6

View file

@ -457,7 +457,7 @@ class ProductsView(MasterView):
return HTML("$ {:0.2f}  ($ {:0.2f} / {})".format( return HTML("$ {:0.2f}  ($ {:0.2f} / {})".format(
price.price, price.pack_price, price.pack_multiple)) price.price, price.pack_price, price.pack_multiple))
if price.price is not None: if price.price is not None:
if price.multiple > 1: if price.multiple is not None and price.multiple > 1:
return "$ {:0.2f} / {}".format(price.price, price.multiple) return "$ {:0.2f} / {}".format(price.price, price.multiple)
return "$ {:0.2f}".format(price.price) return "$ {:0.2f}".format(price.price)
if price.pack_price is not None: if price.pack_price is not None: