diff --git a/govtool/backend/sql/list-proposals.sql b/govtool/backend/sql/list-proposals.sql index dfb54e12d..c0779c6d8 100644 --- a/govtool/backend/sql/list-proposals.sql +++ b/govtool/backend/sql/list-proposals.sql @@ -346,7 +346,7 @@ WHERE off_chain_vote_gov_action_data.abstract ILIKE ? OR off_chain_vote_gov_action_data.motivation ILIKE ? OR off_chain_vote_gov_action_data.rationale ILIKE ? OR - concat(encode(creator_tx.hash, 'hex'), '#', gov_action_proposal.index) ILIKE ?) + concat(encode(creator_tx.hash, 'hex'), '#', gov_action_proposal.index) = ?) GROUP BY gov_action_proposal.id, creator_tx.hash, diff --git a/govtool/backend/src/VVA/Proposal.hs b/govtool/backend/src/VVA/Proposal.hs index 6c31a8016..4d61ec752 100644 --- a/govtool/backend/src/VVA/Proposal.hs +++ b/govtool/backend/src/VVA/Proposal.hs @@ -87,7 +87,7 @@ getProposals mSearchTerms = withPool $ \conn -> do , "%" <> searchParam <> "%" , "%" <> searchParam <> "%" , "%" <> searchParam <> "%" - , "%" <> searchParam <> "%" + , searchParam ) case result of Left (e :: SomeException) -> do @@ -125,4 +125,4 @@ getPreviousEnactedProposal proposalType = withPool $ \conn -> do liftIO $ putStrLn $ "[DEBUG] Previous enacted proposal details: " ++ show details Nothing -> liftIO $ putStrLn "[DEBUG] No previous enacted proposal found" - return proposal \ No newline at end of file + return proposal