fix: move add_colors() out of double session

The double session started causing a lock on the DB that prevented new colors from being added.
This commit is contained in:
Travis Abendshien
2026-08-14 00:22:08 -07:00
parent 1bfea60d7a
commit dd00f4d4a0
@@ -1670,8 +1670,10 @@ class Library:
)
session.execute(update_tags_stmt)
session.commit()
else:
self.add_color(new_color_group)
return
# "if not existing_color", out of the session context
self.add_color(new_color_group)
def update_aliases(self, tag: Tag, aliases: Iterable[TagAlias], session: Session) -> bool:
"""Update TagAliases for a given Tag."""