Skip to content

Commit 4665fc0

Browse files
committed
fix: pass transaction to findOrCreateTags in updatePost to prevent orphan tags
1 parent 30b4932 commit 4665fc0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/stack/src/plugins/blog/api/mutations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export async function updatePost(
226226
}
227227

228228
if (tagInputs.length > 0) {
229-
const resolvedTags = await findOrCreateTags(adapter, tagInputs);
229+
const resolvedTags = await findOrCreateTags(tx, tagInputs);
230230

231231
for (const tag of resolvedTags) {
232232
await tx.create<{ postId: string; tagId: string }>({

0 commit comments

Comments
 (0)