Skip to content

Commit

Permalink
fix: dump tags ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Aug 29, 2024
1 parent 68c1b36 commit 8832ca5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions platform_plugin_aspects/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ def get_tags_for_block(usage_key) -> dict:
Returns a dict of [taxonomy]: [tag, tag, tag]
"""
tags = _get_object_tags(usage_key)
serialized_tags = [tag.id for tag in tags]
object_tags = _get_object_tags(usage_key)
serialized_tags = []
for object_tag in object_tags:
tag = object_tag.tag
while tag:
serialized_tags.append(tag.id)
tag = tag.parent

return serialized_tags

0 comments on commit 8832ca5

Please sign in to comment.