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