[FIX$] website: basically fixed error in image controller: shoudl be improved with a default image, though

bzr revid: tde@openerp.com-20131008115017-fmmv9zxvn6akssfi
This commit is contained in:
Thibault Delavallée 2013-10-08 13:50:17 +02:00
parent e541755ae4
commit 50a72715d2
1 changed files with 3 additions and 0 deletions

View File

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