Skip to content

Commit

Permalink
add user passport score null case to clustermatching queries
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosQ96 committed Jan 22, 2025
1 parent 54fa338 commit 5822180
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/repositories/donationRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ export const exportClusterMatchingDonationsFormat = async (
d."toWalletAddress" AS "payoutAddress",
d."valueUsd" AS "amountUSD",
p."title" AS "project_name",
d."qfRoundUserScore" AS score
FROM
CASE
WHEN d."qfRoundUserScore" IS NOT NULL THEN d."qfRoundUserScore"
ELSE u."passportScore"
END AS score
FROM
donation d
INNER JOIN
project p ON d."projectId" = p."id"
INNER JOIN
"user" u ON d."userId" = u."id"
WHERE
d."qfRoundId" = $1
`,
Expand Down

0 comments on commit 5822180

Please sign in to comment.