fix empty comments
This commit is contained in:
parent
6d80678564
commit
e0ad819caa
|
|
@ -625,7 +625,7 @@ class Establishment(GalleryModelMixin, ProjectBaseMixin, URLImageMixin,
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def last_comment(self):
|
def last_comment(self):
|
||||||
if hasattr(self, 'comments_prefetched'):
|
if hasattr(self, 'comments_prefetched') and len(self.comments_prefetched):
|
||||||
return self.comments_prefetched[0]
|
return self.comments_prefetched[0]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user