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.

Block reopening partially approved bounty submissions

Rafife0093aa1f95
diff --git a/apps/web/lib/actions/partners/reopen-bounty-submission.ts b/apps/web/lib/actions/partners/reopen-bounty-submission.ts
index de58f4e47f..f27eefbf5e 100644
--- a/apps/web/lib/actions/partners/reopen-bounty-submission.ts
+++ b/apps/web/lib/actions/partners/reopen-bounty-submission.ts
@@ -48,6 +48,12 @@ export const reopenBountySubmissionAction = authActionClient
throw new Error("Bounty submission has already been approved.");
}
+ if (bountySubmission.status === "partiallyApproved") {
+ throw new Error(
+ "Bounty submission has approved milestones and cannot be reopened.",
+ );
+ }
+
await prisma.bountySubmission.update({
where: {
id: submissionId,