fix main_image for news
(cherry picked from commit 8ca213a)
This commit is contained in:
parent
670da807af
commit
432873da31
|
|
@ -307,7 +307,7 @@ class News(GalleryMixin, BaseAttributes, TranslatedFieldsMixin, HasTagsMixin,
|
||||||
def main_image(self):
|
def main_image(self):
|
||||||
qs = self.news_gallery.main_image()
|
qs = self.news_gallery.main_image()
|
||||||
if qs.exists():
|
if qs.exists():
|
||||||
return qs.first().image
|
return qs.order_by('-id').first().image
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def image_url(self):
|
def image_url(self):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user