fix fillobj() on videos without thumbnails

This commit is contained in:
Romain Bignon 2011-04-23 09:22:25 +02:00
commit 203d540163
7 changed files with 8 additions and 8 deletions

View file

@ -59,7 +59,7 @@ class CanalplusBackend(BaseBackend, ICapVideo, ICapCollection):
# if we don't want only the thumbnail, we probably want also every fields
with self.browser:
video = self.browser.get_video(CanalplusVideo.id2url(video.id), video)
if 'thumbnail' in fields:
if 'thumbnail' in fields and video.thumbnail:
with self.browser:
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
return video