Skip to content

Commit

Permalink
Fix: Exclude flagged proposals from active proposals count (#750)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR committed Nov 13, 2023
1 parent 578aa29 commit a16e87c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async function getProposals() {
const ts = parseInt((Date.now() / 1e3).toFixed());
const query = `
SELECT space, COUNT(id) AS count,
COUNT(IF(start < ? AND end > ?, 1, NULL)) AS active,
COUNT(IF(start < ? AND end > ? AND flagged = 0, 1, NULL)) AS active,
count(IF(created > (UNIX_TIMESTAMP() - 604800), 1, NULL)) as count_7d
FROM proposals GROUP BY space
`;
Expand Down

0 comments on commit a16e87c

Please sign in to comment.