From 50a72715d2d2c2b855591fc6b5b8f448a37fd0d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 8 Oct 2013 13:50:17 +0200 Subject: [PATCH] [FIX$] website: basically fixed error in image controller: shoudl be improved with a default image, though bzr revid: tde@openerp.com-20131008115017-fmmv9zxvn6akssfi --- addons/website/controllers/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py index 620ec543b54..fd09363d85e 100644 --- a/addons/website/controllers/main.py +++ b/addons/website/controllers/main.py @@ -299,6 +299,9 @@ class Images(http.Controller): response.last_modified = datetime.datetime.strptime( record[concurrency], server_format) # FIXME: no field in record? + if not field in record or not record[field]: + return response + response.set_etag(hashlib.sha1(record[field]).hexdigest()) response.make_conditional(request.httprequest)