From 94fb7de29f34d199df318707639af98c6c900f57 Mon Sep 17 00:00:00 2001 From: jankun4 Date: Wed, 10 Apr 2024 11:26:10 +0200 Subject: [PATCH] [#685] fix getVotes 500 error Signed-off-by: jankun4 --- CHANGELOG.md | 1 + govtool/backend/sql/get-votes.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f42ac266..018b544e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ changes. ### Fixed +- drep/getVotes no longer returns 500 [Issue 685](https://github.com/IntersectMBO/govtool/issues/685) - drep/info no longer returns 500 [Issue 676](https://github.com/IntersectMBO/govtool/issues/676) - proposal/list search is case insensitive now [Issue 582](https://github.com/IntersectMBO/govtool/issues/582) - proposal/list now takes optional `search` query param [Issue 566](https://github.com/IntersectMBO/govtool/issues/566) diff --git a/govtool/backend/sql/get-votes.sql b/govtool/backend/sql/get-votes.sql index 1e9a49cfe..7a875aba8 100644 --- a/govtool/backend/sql/get-votes.sql +++ b/govtool/backend/sql/get-votes.sql @@ -1,4 +1,5 @@ select DISTINCT ON (voting_procedure.gov_action_proposal_id, voting_procedure.drep_voter) voting_procedure.gov_action_proposal_id, concat(encode(gov_action_tx.hash,'hex'),'#',gov_action_proposal.index), encode(drep_hash.raw, 'hex'), voting_procedure.vote::text, voting_anchor.url, encode(voting_anchor.data_hash, 'hex'), block.epoch_no as epoch_no, block.time as time, encode(vote_tx.hash, 'hex') as vote_tx_hash +from voting_procedure join gov_action_proposal on gov_action_proposal.id = voting_procedure.gov_action_proposal_id join drep_hash