Skip to content

Commit

Permalink
[#720] fix drep/info null values
Browse files Browse the repository at this point in the history
Signed-off-by: jankun4 <michaljankun@gmail.com>
  • Loading branch information
jankun4 committed Apr 15, 2024
1 parent f24c696 commit 9fdb3ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ changes.

### Fixed

- drep/info no longer returns null values [Issue 720](https://github.com/IntersectMBO/govtool/issues/720)
- 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)
Expand Down
14 changes: 7 additions & 7 deletions govtool/backend/sql/get-drep-info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ DRepRegister AS (
DRepRetire AS (
SELECT
encode(AllRegistrationEntries.tx_hash, 'hex') as tx_hash,
AllRegistrationEntries.tx_id
AllRegistrationEntries.tx_id as tx_id
FROM
DRepRegister
LEFT JOIN
AllRegistrationEntries ON AllRegistrationEntries.deposit < 0
OR AllRegistrationEntries.voting_anchor_id IS NULL
WHERE AllRegistrationEntries.tx_id > DRepRegister.tx_id
AllRegistrationEntries ON (AllRegistrationEntries.deposit < 0
OR AllRegistrationEntries.voting_anchor_id IS NULL)
and AllRegistrationEntries.tx_id > DRepRegister.tx_id
ORDER BY
AllRegistrationEntries.tx_id asc

Expand All @@ -156,9 +156,9 @@ SoleVoterRetire AS (
FROM
SoleVoterRegister
LEFT JOIN
AllRegistrationEntries ON AllRegistrationEntries.deposit < 0
OR AllRegistrationEntries.voting_anchor_id IS NOT NULL
WHERE AllRegistrationEntries.tx_id > SoleVoterRegister.tx_id
AllRegistrationEntries ON (AllRegistrationEntries.deposit < 0
OR AllRegistrationEntries.voting_anchor_id IS NOT NULL)
AND AllRegistrationEntries.tx_id > SoleVoterRegister.tx_id
ORDER BY
AllRegistrationEntries.tx_id asc

Expand Down

0 comments on commit 9fdb3ff

Please sign in to comment.