fix: check if product_info exists before setting price
This commit is contained in:
parent
91a02868cb
commit
91b41db9e3
@ -386,6 +386,7 @@ def get_items(filters=None, search=None):
|
|||||||
r.description = r.web_long_description or r.description
|
r.description = r.web_long_description or r.description
|
||||||
r.image = r.website_image or r.image
|
r.image = r.website_image or r.image
|
||||||
product_info = get_product_info_for_website(r.item_code, skip_quotation_creation=True).get('product_info')
|
product_info = get_product_info_for_website(r.item_code, skip_quotation_creation=True).get('product_info')
|
||||||
|
if product_info:
|
||||||
r.formatted_price = product_info['price'].get('formatted_price') if product_info['price'] else None
|
r.formatted_price = product_info['price'].get('formatted_price') if product_info['price'] else None
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user