Skip to content

Commit

Permalink
fix: hlint warning on using maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
MSzalowski committed Oct 28, 2024
1 parent 9e9e9a7 commit 69267e7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions govtool/backend/sql/list-dreps.sql
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,7 @@ WHERE
(
COALESCE(?, '') = '' OR
dh.view ILIKE ? OR
off_chain_vote_drep_data.payment_address ILIKE ? OR
off_chain_vote_drep_data.given_name ILIKE ? OR
off_chain_vote_drep_data.objectives ILIKE ? OR
off_chain_vote_drep_data.motivations ILIKE ? OR
off_chain_vote_drep_data.qualifications ILIKE ?
)
GROUP BY
dh.raw,
Expand Down
2 changes: 1 addition & 1 deletion govtool/backend/src/VVA/Proposal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ getProposals ::
(Has ConnectionPool r, Has VVAConfig r, MonadReader r m, MonadIO m, MonadFail m, MonadError AppError m) =>
Maybe [Text] -> m [Proposal]
getProposals mSearchTerms = withPool $ \conn -> do
let searchParam = fromMaybe "" (fmap head mSearchTerms)
let searchParam = maybe "" head mSearchTerms
liftIO $ SQL.query conn listProposalsSql
( searchParam
, "%" <> searchParam <> "%"
Expand Down

0 comments on commit 69267e7

Please sign in to comment.