Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update delete-discount.ts

Kiran K93711edcce11
diff --git a/apps/web/lib/actions/partners/delete-discount.ts b/apps/web/lib/actions/partners/delete-discount.ts
index cde2033435..d45ead809c 100644
--- a/apps/web/lib/actions/partners/delete-discount.ts
+++ b/apps/web/lib/actions/partners/delete-discount.ts
@@ -34,6 +34,7 @@ export const deleteDiscountAction = authActionClient
});
await prisma.$transaction(async (tx) => {
+ // Using updateMany otherwise this would fail if the discount is not a group-level discount
await tx.partnerGroup.updateMany({
where: {
discountId,