From d6cadf90b819266c4a80906ef785aa02f2d7468e Mon Sep 17 00:00:00 2001 From: ChaituVR Date: Sat, 7 Sep 2024 22:54:39 +0530 Subject: [PATCH] fix: Exclude votes without proposals --- src/graphql/operations/votes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/graphql/operations/votes.ts b/src/graphql/operations/votes.ts index 0163dc52..9ca9e22e 100644 --- a/src/graphql/operations/votes.ts +++ b/src/graphql/operations/votes.ts @@ -44,6 +44,7 @@ async function query(parent, args, context?, info?) { const query = ` SELECT v.* FROM votes v + INNER JOIN proposals p ON v.proposal = p.id WHERE 1 = 1 ${queryStr} ORDER BY ${orderBy} ${orderDirection}, v.id ASC LIMIT ?, ? `;