Skip to content

Commit

Permalink
fix(api):correctly exclude archive candidacies from active juries fil…
Browse files Browse the repository at this point in the history
…ter results
  • Loading branch information
pierreavizou committed Dec 17, 2024
1 parent c2bc950 commit 34a2098
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ export const getWhereClauseFromJuryStatusFilter = (
let whereClause: Prisma.JuryWhereInput = { isActive: true };
const excludeArchivedAndDroppedOutCandidacy: Prisma.JuryWhereInput = {
candidacy: {
candidacyStatuses: { none: { isActive: true, status: "ARCHIVE" } },
status: {
not: "ARCHIVE",
},
candidacyDropOut: { is: null },
},
};
switch (statusFilter) {
case undefined:
case "ALL":
// Default
whereClause = {
...whereClause,
...excludeArchivedAndDroppedOutCandidacy,
};
break;
case "SCHEDULED":
whereClause = {
Expand Down

0 comments on commit 34a2098

Please sign in to comment.