try to fix issue w/ news tag binding

This commit is contained in:
Kuroshini 2019-12-09 17:19:29 +03:00
parent 6a3a40be4f
commit d12ad93fe1

View File

@ -2,6 +2,7 @@
from django.conf import settings
from django_elasticsearch_dsl import Document, Index, fields
from tag import models
from news.models import News
TagCategoryIndex = Index(settings.ELASTICSEARCH_INDEX_NAMES.get(__name__, 'tag_category'))
TagCategoryIndex.settings(number_of_shards=2, number_of_replicas=2)
@ -26,7 +27,7 @@ class TagCategoryDocument(Document):
'public',
'value_type'
)
related_models = [models.Tag]
related_models = [models.Tag, News]
def get_queryset(self):