mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 01:11:36 +03:00
fix(server): tag upsert (#12141)
This commit is contained in:
@@ -13,12 +13,7 @@ export const upsertTags = async (repository: ITagRepository, { userId, tags }: U
|
||||
|
||||
for (const part of parts) {
|
||||
const value = parent ? `${parent.value}/${part}` : part;
|
||||
let tag = await repository.getByValue(userId, value);
|
||||
if (!tag) {
|
||||
tag = await repository.create({ userId, value, parent });
|
||||
}
|
||||
|
||||
parent = tag;
|
||||
parent = await repository.upsertValue({ userId, value, parent });
|
||||
}
|
||||
|
||||
if (parent) {
|
||||
|
||||
Reference in New Issue
Block a user