Skip to content

Commit

Permalink
Merge pull request #6501 from escattone/topics-of-translation-not-ref…
Browse files Browse the repository at this point in the history
…lecting-parent

use topics of parent for translations in `build_topics_data`
  • Loading branch information
akatsoulas authored Feb 12, 2025
2 parents 72a8243 + 36ca9f7 commit ad0011b
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 ad0011b

Please sign in to comment.