fix issue w/ tags binding
This commit is contained in:
parent
d12ad93fe1
commit
be793eed73
|
|
@ -32,3 +32,11 @@ class TagCategoryDocument(Document):
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
return super().get_queryset().with_base_related()
|
return super().get_queryset().with_base_related()
|
||||||
|
|
||||||
|
def get_instances_from_related(self, related_instance):
|
||||||
|
"""If related_models is set, define how to retrieve the Car instance(s) from the related model.
|
||||||
|
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, News):
|
||||||
|
return related_instance.tags
|
||||||
Loading…
Reference in New Issue
Block a user