Prevent error in old product search logic

when no POD image URL is configured
This commit is contained in:
Lance Edgar 2023-05-16 17:33:07 -05:00
parent 5f6b389556
commit 93bce57888

View file

@ -1876,6 +1876,7 @@ class ProductView(MasterView):
]) ])
# TODO: deprecate / remove this? not sure if/where it is used # TODO: deprecate / remove this? not sure if/where it is used
# (hm, still used by the old Instacart -> Configure page..)
def search_v1(self): def search_v1(self):
""" """
Locate a product(s) by UPC. Locate a product(s) by UPC.
@ -1898,7 +1899,8 @@ class ProductView(MasterView):
'upc': str(product.upc), 'upc': str(product.upc),
'upc_pretty': product.upc.pretty(), 'upc_pretty': product.upc.pretty(),
'full_description': product.full_description, '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') uuid = self.request.GET.get('with_vendor_cost')
if uuid: if uuid: