Skip to content

Commit d44ec5d

Browse files
committed
fix: include joins in Library.get_tag_hierarchy
1 parent b3bd772 commit d44ec5d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tagstudio/core/library/alchemy/library.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,12 @@ def get_tag_hierarchy(
14741474
current_tag_ids.add(tag_parent.child_id)
14751475
current_tag_ids = current_tag_ids.difference(all_tag_ids)
14761476

1477-
statement = select(Tag).where(Tag.id.in_(all_tag_ids)).options(noload(Tag.parent_tags))
1477+
statement = select(Tag).where(Tag.id.in_(all_tag_ids))
1478+
statement = statement.options(
1479+
noload(Tag.parent_tags),
1480+
selectinload(Tag.aliases),
1481+
joinedload(Tag.color)
1482+
)
14781483
tags = session.scalars(statement).fetchall()
14791484
for tag in tags:
14801485
all_tags[tag.id] = tag

0 commit comments

Comments
 (0)