Skip to content

Commit

Permalink
use topics of parent for translations in build_topics_data
Browse files Browse the repository at this point in the history
  • Loading branch information
escattone committed Feb 11, 2025
1 parent 72a8243 commit 36ca9f7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kitsune/wiki/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,7 @@ def build_topics_data(request: HttpRequest, product: Product, topics: list[Topic
doc_topics_map: dict[int, list[Topic]] = {}

for doc in all_documents:
doc_topics = set(doc.topics.all()) or (
set(doc.parent.topics.all()) if doc.parent else set()
)
doc_topics = set(doc.parent.topics.all()) if doc.parent else set(doc.topics.all())

doc_topics_map[doc.id] = list(doc_topics)
for topic in doc_topics:
Expand Down

0 comments on commit 36ca9f7

Please sign in to comment.