Skip to content

Commit

Permalink
Fix the collection of parents in TagStore's XML export.
Browse files Browse the repository at this point in the history
The original version looped over only the root elements when
collecting parent-child relations. Now, the code uses the
'lookup' dictionary that contains every tag.
  • Loading branch information
gycsaba96 committed May 7, 2024
1 parent dc0eb1a commit ebaf588
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GTG/core/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def to_xml(self) -> Element:

parent_map = {}

for tag in self.data:
for tag in self.lookup.values():
for child in tag.children:
parent_map[child.id] = tag.id

Expand Down

0 comments on commit ebaf588

Please sign in to comment.