File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ changes.
1717### Fixed
1818
1919- Fix validating metadata against the CIP standard [ Issue 2233] ( https://github.com/IntersectMBO/govtool/issues/2233 )
20+ - Fix counting the CC votes [ Issue 2247] ( https://github.com/IntersectMBO/govtool/issues/2247 )
2021
2122### Changed
2223
Original file line number Diff line number Diff line change @@ -129,14 +129,19 @@ FROM
129129 SUM (CASE WHEN vote = ' No' THEN 1 ELSE 0 END) AS ccNoVotes,
130130 SUM (CASE WHEN vote = ' Abstain' THEN 1 ELSE 0 END) AS ccAbstainVotes
131131 FROM
132- voting_procedure
132+ voting_procedure AS vp
133133 WHERE
134- committee_voter IS NOT NULL
134+ vp .committee_voter IS NOT NULL
135+ AND (vp .tx_id , vp .committee_voter , vp .gov_action_proposal_id ) IN (
136+ SELECT MAX (tx_id), committee_voter, gov_action_proposal_id
137+ FROM voting_procedure
138+ WHERE committee_voter IS NOT NULL
139+ GROUP BY committee_voter, gov_action_proposal_id
140+ )
135141 GROUP BY
136142 gov_action_proposal_id
137143 ) vp_by_cc
138144 ON gov_action_proposal .id = vp_by_cc .gov_action_proposal_id
139-
140145 LEFT JOIN LatestDrepDistr ldd_cc ON ldd_cc .hash_id = voting_procedure .committee_voter
141146 AND ldd_cc .rn = 1
142147 LEFT JOIN gov_action_proposal AS prev_gov_action ON gov_action_proposal .prev_gov_action_proposal = prev_gov_action .id
You can’t perform that action at this time.
0 commit comments