homenews: do not fail on missing picture
This commit is contained in:
parent
14b72927f5
commit
57958bc597
|
@ -27,6 +27,8 @@ class View(grok.View):
|
|||
|
||||
class PictureView(BrowserView):
|
||||
def __call__(self):
|
||||
if not self.context.picture:
|
||||
return None
|
||||
self.request.response.setHeader('Content-type', self.context.picture.contentType)
|
||||
return self.context.picture.data
|
||||
|
||||
|
|
Reference in New Issue