Fix bug when product has empty suggested price
This commit is contained in:
parent
f385aab44a
commit
0fa888efaf
|
@ -558,8 +558,10 @@ class ProductView(MasterView):
|
||||||
|
|
||||||
def render_suggested_price(self, product, column):
|
def render_suggested_price(self, product, column):
|
||||||
text = self.render_price(product, column)
|
text = self.render_price(product, column)
|
||||||
|
if not text:
|
||||||
|
return
|
||||||
|
|
||||||
if text and self.show_price_effective_dates():
|
if self.show_price_effective_dates():
|
||||||
history = self.get_suggested_price_history(product)
|
history = self.get_suggested_price_history(product)
|
||||||
if history:
|
if history:
|
||||||
date = localtime(self.rattail_config, history[0]['changed'], from_utc=True).date()
|
date = localtime(self.rattail_config, history[0]['changed'], from_utc=True).date()
|
||||||
|
|
Loading…
Reference in a new issue