Skip to content

Commit 78a63ab

Browse files
authored
Merge pull request #3912 from IntersectMBO/fix/3911-error-500-when-accessing-governance-action-details-due-to-ambiguous-identifier-matching
Update Proposal.hs - making sure it does exact txhash match
2 parents 4f15878 + 8d3502b commit 78a63ab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

govtool/backend/sql/list-proposals.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ WHERE
346346
off_chain_vote_gov_action_data.abstract ILIKE ? OR
347347
off_chain_vote_gov_action_data.motivation ILIKE ? OR
348348
off_chain_vote_gov_action_data.rationale ILIKE ? OR
349-
concat(encode(creator_tx.hash, 'hex'), '#', gov_action_proposal.index) ILIKE ?)
349+
concat(encode(creator_tx.hash, 'hex'), '#', gov_action_proposal.index) = ?)
350350
GROUP BY
351351
gov_action_proposal.id,
352352
creator_tx.hash,

govtool/backend/src/VVA/Proposal.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ getProposals mSearchTerms = withPool $ \conn -> do
8787
, "%" <> searchParam <> "%"
8888
, "%" <> searchParam <> "%"
8989
, "%" <> searchParam <> "%"
90-
, "%" <> searchParam <> "%"
90+
, searchParam
9191
)
9292
case result of
9393
Left (e :: SomeException) -> do
@@ -125,4 +125,4 @@ getPreviousEnactedProposal proposalType = withPool $ \conn -> do
125125
liftIO $ putStrLn $ "[DEBUG] Previous enacted proposal details: " ++ show details
126126
Nothing ->
127127
liftIO $ putStrLn "[DEBUG] No previous enacted proposal found"
128-
return proposal
128+
return proposal

0 commit comments

Comments
 (0)