From 93bce5788813c8c07083e578e350916ecb983c25 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 16 May 2023 17:33:07 -0500 Subject: [PATCH] Prevent error in old product search logic when no POD image URL is configured --- tailbone/views/products.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tailbone/views/products.py b/tailbone/views/products.py index 9700424b..8988538b 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -1876,6 +1876,7 @@ class ProductView(MasterView): ]) # TODO: deprecate / remove this? not sure if/where it is used + # (hm, still used by the old Instacart -> Configure page..) def search_v1(self): """ Locate a product(s) by UPC. @@ -1898,7 +1899,8 @@ class ProductView(MasterView): 'upc': str(product.upc), 'upc_pretty': product.upc.pretty(), 'full_description': product.full_description, - 'image_url': pod.get_image_url(self.rattail_config, product.upc), + 'image_url': pod.get_image_url(self.rattail_config, product.upc, + require=False), } uuid = self.request.GET.get('with_vendor_cost') if uuid: