mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-08-15 00:29:40 +02:00
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:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user