From ad2724fd2fe6b495eed46749ecef9897b94dfcf0 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 11 Nov 2016 22:15:47 -0600 Subject: [PATCH] Make POD image for product view a bit more sane --- tailbone/templates/products/view.mako | 2 +- tailbone/views/products.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tailbone/templates/products/view.mako b/tailbone/templates/products/view.mako index 623d1db8..72549393 100644 --- a/tailbone/templates/products/view.mako +++ b/tailbone/templates/products/view.mako @@ -75,7 +75,7 @@ ${render_field_readonly(form.fieldset.size)} ${render_field_readonly(form.fieldset.case_pack)} - % if image: + % if image_url: ${h.image(image_url, "Product Image", id='product-image', path=image_path, use_pil=False)} % endif diff --git a/tailbone/views/products.py b/tailbone/views/products.py index b7eb8b7c..ccd167ec 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -313,8 +313,6 @@ class ProductsView(MasterView): if product.upc: kwargs['image_url'] = pod.get_image_url(self.rattail_config, product.upc) kwargs['image_path'] = pod.get_image_path(self.rattail_config, product.upc) - if os.path.exists(kwargs['image_path']): - kwargs['image'] = True return kwargs def edit(self):