only update if poster is valid
This commit is contained in:
parent
85b88c4dd6
commit
c2df43220b
1 changed files with 1 additions and 1 deletions
|
@ -1375,7 +1375,7 @@ class Item(models.Model):
|
|||
self.poster_height = self.poster.height
|
||||
self.poster_width = self.poster.width
|
||||
self.clear_poster_cache(self.poster.path)
|
||||
if self.cache.get('posterRatio') != self.poster_width / self.poster_height:
|
||||
if self.poster_width and self.cache.get('posterRatio') != self.poster_width / self.poster_height:
|
||||
self.update_cache(poster_width=self.poster_width,
|
||||
poster_height=self.poster_height)
|
||||
|
||||
|
|
Loading…
Reference in a new issue