Skip to content

Commit 60f1fed

Browse files
Remove group by numerator and denominator clause in cc-vote-count
1 parent 2897939 commit 60f1fed

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/repository/proposal.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Prisma } from '@prisma/client'
22
import { prisma } from '../config/db'
3-
import { formatResult } from '../helpers/formatter'
43
import { ProposalTypes, SortTypes } from '../types/proposal'
54

65
export const fetchProposals = async (
@@ -519,7 +518,6 @@ export const fetchProposalVoteCount = async (proposalId: string, proposalIndex:
519518
LEFT JOIN RatifiedCommitteeGovAction rc
520519
ON rc.id = c.gov_action_proposal_id
521520
WHERE c.gov_action_proposal_id IS NULL
522-
GROUP BY c.quorum_numerator, c.quorum_denominator
523521
),
524522
committeeVoteRecord AS (
525523
WITH CommitteeVotes AS (
@@ -1326,6 +1324,7 @@ export const fetchProposalById = async (proposalId: string, proposaIndex: number
13261324
any,
13271325
any
13281326
>[]
1327+
if (result.length == 0) return result
13291328
const proposalVoteCount = includeVoteCount
13301329
? { vote: await fetchProposalVoteCount(proposalId, proposaIndex) }
13311330
: undefined

0 commit comments

Comments
 (0)