From 28897ff79da4679bf9f15a90d7ec3d24c14fcbe3 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 29 Apr 2016 22:49:08 +0200 Subject: [PATCH] only return valid image --- oxdata/poster/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oxdata/poster/models.py b/oxdata/poster/models.py index c16d0b4..11be8ae 100644 --- a/oxdata/poster/models.py +++ b/oxdata/poster/models.py @@ -119,7 +119,8 @@ class PosterCache(models.Model): self.status = "invalid image" self.image.delete() self.save() - return self.image + if not failed: + return self.image def get_poster_urls(m): def addPoster(url, site, site_id):