From e65bd99f314b2e7ce0cba931cb70a067c3510c9f Mon Sep 17 00:00:00 2001 From: j Date: Thu, 22 Feb 2018 19:19:05 +0530 Subject: [PATCH] check photo not url --- content/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/models.py b/content/models.py index fd5a6de..88428a5 100644 --- a/content/models.py +++ b/content/models.py @@ -125,7 +125,7 @@ class Content(models.Model): @property def image_url(self): - if self.photo.image.url: + if self.photo: return self.photo.image.url if self.image: if self.image.startswith('http') or self.image.startswith('/'):