Merge branch 'develop' into feature/similar-wines
This commit is contained in:
commit
aea5c9e96b
|
|
@ -39,4 +39,8 @@ class TagCategoryDocument(Document):
|
||||||
to the updating of a lot of items.
|
to the updating of a lot of items.
|
||||||
"""
|
"""
|
||||||
if isinstance(related_instance, News):
|
if isinstance(related_instance, News):
|
||||||
return related_instance.tags
|
tag_categories = []
|
||||||
|
for tag in related_instance.tags.all():
|
||||||
|
if tag.category not in tag_categories:
|
||||||
|
tag_categories.append(tag.category)
|
||||||
|
return tag_categories
|
||||||
Loading…
Reference in New Issue
Block a user