refactor(import): drop artist:/archive: prefix from constructed tag names
Tag.name holds the bare identifier; Tag.kind already carried the role. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -810,10 +810,9 @@ def _add_artist_tag(record: ImageRecord, artist: str):
|
||||
if not artist:
|
||||
return
|
||||
|
||||
tag_name = f"artist:{artist}"
|
||||
tag = Tag.query.filter_by(name=tag_name).first()
|
||||
tag = Tag.query.filter_by(kind='artist', name=artist).first()
|
||||
if not tag:
|
||||
tag = Tag(name=tag_name, kind='artist')
|
||||
tag = Tag(kind='artist', name=artist)
|
||||
db.session.add(tag)
|
||||
db.session.flush()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user