check photo not url
This commit is contained in:
parent
7cd8136260
commit
e65bd99f31
|
@ -125,7 +125,7 @@ class Content(models.Model):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def image_url(self):
|
def image_url(self):
|
||||||
if self.photo.image.url:
|
if self.photo:
|
||||||
return self.photo.image.url
|
return self.photo.image.url
|
||||||
if self.image:
|
if self.image:
|
||||||
if self.image.startswith('http') or self.image.startswith('/'):
|
if self.image.startswith('http') or self.image.startswith('/'):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user