fix news indexing
This commit is contained in:
parent
c1bb7c9b79
commit
c90f8302ee
|
|
@ -232,7 +232,7 @@ class News(GalleryModelMixin, BaseAttributes, TranslatedFieldsMixin, HasTagsMixi
|
|||
|
||||
@property
|
||||
def web_url(self):
|
||||
return reverse('web:news:rud', kwargs={'slug': self.slug})
|
||||
return reverse('web:news:rud', kwargs={'slug': next(iter(self.slugs.values()))})
|
||||
|
||||
def should_read(self, user):
|
||||
return self.__class__.objects.should_read(self, user)[:3]
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class NewsDocument(Document):
|
|||
'name': fields.KeywordField()})
|
||||
title = fields.ObjectField(attr='title_indexing',
|
||||
properties=OBJECT_FIELD_PROPERTIES)
|
||||
slugs = fields.ObjectField(properties=OBJECT_FIELD_PROPERTIES)
|
||||
slugs = fields.ObjectField()
|
||||
backoffice_title = fields.TextField(analyzer='english')
|
||||
subtitle = fields.ObjectField(attr='subtitle_indexing',
|
||||
properties=OBJECT_FIELD_PROPERTIES)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user