Skip to content

Commit

Permalink
Merge pull request #677 from IntersectMBO/676-error-500-when-requesti…
Browse files Browse the repository at this point in the history
…ng-drepinfo

[#676] fix drep/info SQL error
  • Loading branch information
MSzalowski authored Apr 9, 2024
2 parents e9cdbea + 851201f commit 5eeb63f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ changes.

### Fixed

- 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)
- Fix possible sql error when there would be no predefined drep voting pwoer [Issue 501](https://github.com/IntersectMBO/govtool/issues/501)
Expand Down
5 changes: 3 additions & 2 deletions govtool/backend/sql/get-drep-info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WITH DRepId AS (
LatestRegistrationEntry AS (
SELECT
drep_registration.voting_anchor_id AS voting_anchor_id,
deposit AS deposit
drep_registration.deposit AS deposit,
tx.hash as tx_hash
FROM
drep_registration
Expand Down Expand Up @@ -98,7 +98,7 @@ SELECT
CurrentMetadata.url,
CurrentMetadata.data_hash,
CurrentVotingPower.amount,
LatestRegistrationEntry.tx_hash
encode(LatestRegistrationEntry.tx_hash, 'hex') as tx_hash
FROM
IsRegisteredAsDRep
CROSS JOIN IsRegisteredAsSoleVoter
Expand All @@ -107,3 +107,4 @@ FROM
CROSS JOIN CurrentDeposit
CROSS JOIN CurrentMetadata
CROSS JOIN CurrentVotingPower
CROSS JOIN LatestRegistrationEntry

0 comments on commit 5eeb63f

Please sign in to comment.