Make POD image for product view a bit more sane

This commit is contained in:
Lance Edgar 2016-11-11 22:15:47 -06:00
parent 536e1aa3eb
commit ad2724fd2f
2 changed files with 1 additions and 3 deletions

View file

@ -75,7 +75,7 @@
${render_field_readonly(form.fieldset.size)}
${render_field_readonly(form.fieldset.case_pack)}
</div>
% if image:
% if image_url:
${h.image(image_url, "Product Image", id='product-image', path=image_path, use_pil=False)}
% endif
</div>

View file

@ -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):