fix news ES indexing
This commit is contained in:
parent
b7fa52a2ab
commit
dd588c039f
|
|
@ -71,5 +71,5 @@ class NewsDocument(Document):
|
||||||
The related_models option should be used with caution because it can lead in the index
|
The related_models option should be used with caution because it can lead in the index
|
||||||
to the updating of a lot of items.
|
to the updating of a lot of items.
|
||||||
"""
|
"""
|
||||||
if isinstance(related_instance, models.NewsType) and hasattr(related_instance, 'news_set'):
|
if isinstance(related_instance, models.NewsType) and hasattr(related_instance, 'news'):
|
||||||
return related_instance.news_set.all()
|
return related_instance.news.all()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user