Skip to content

Commit

Permalink
Merge pull request #1343 from rockingrohit9639/fix/delete-transaction…
Browse files Browse the repository at this point in the history
…-issue

fix: transaction issue on bulk delete assets
  • Loading branch information
DonKoko authored Oct 8, 2024
2 parents 59bb016 + 4d798ed commit 9f3c89d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/modules/asset/service.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2301,10 +2301,8 @@ export async function bulkDeleteAssets({
});

try {
await db.$transaction(async (tx) => {
await tx.asset.deleteMany({
where: { id: { in: assets.map((asset) => asset.id) } },
});
await db.asset.deleteMany({
where: { id: { in: assets.map((asset) => asset.id) } },
});

/** Deleting images of the assets (if any) */
Expand Down

0 comments on commit 9f3c89d

Please sign in to comment.