Skip to content

Commit

Permalink
fix: 🐛 紧急修复 0.6.1 无法同步 Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
meetqy committed Jun 21, 2023
1 parent a84e00d commit c209116
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/eagle/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const handleImage = async ({ images, library, emit, onError }: Props) =>
});

// 清除 image 为 0 的 tag
await Curd(prisma).tag().cleanWithImageZero({ libraryId: library.id });
// await Curd(prisma).tag().cleanWithImageZero({ libraryId: library.id });
};

/**
Expand All @@ -80,10 +80,12 @@ const updateTags = async (metadata: Metadata, library: Library) => {
// disconnect tags that are not in metadata.tags
for (const tag of existingTags) {
if (!metadataTagNames.has(tag.name)) {
await prisma.image.update({
where: { id: metadata.id },
data: { tags: { disconnect: { name: tag.name } } },
});
try {
await prisma.image.update({
where: { id: metadata.id },
data: { tags: { disconnect: { name: tag.name } } },
});
} catch (e) {}
}
}

Expand Down

0 comments on commit c209116

Please sign in to comment.