diff --git a/src/Application.hs b/src/Application.hs index 29eb69e05..001d87096 100644 --- a/src/Application.hs +++ b/src/Application.hs @@ -709,7 +709,4 @@ addPWEntry :: User addPWEntry User{ userAuthentication = _, ..} (Text.encodeUtf8 -> pw) = db' $ do PWHashConf{..} <- getsYesod $ view _appAuthPWHash (AuthPWHash . Text.decodeUtf8 -> userAuthentication) <- liftIO $ makePasswordWith pwHashAlgorithm pw pwHashStrength - void $ insert User{..} - - - + void $ insert User{..} \ No newline at end of file diff --git a/src/Handler/Material.hs b/src/Handler/Material.hs index 226fbd28d..147c79344 100644 --- a/src/Handler/Material.hs +++ b/src/Handler/Material.hs @@ -18,6 +18,7 @@ import qualified Data.CaseInsensitive as CI -- import qualified Data.Text.Encoding as Text import qualified Database.Esqueleto.Legacy as E +import qualified Database.Esqueleto.Utils as E import Utils.Form import Handler.Utils @@ -146,7 +147,7 @@ getMaterialListR tid ssh csh = do , (singletonMap "searchTypeAndDescription". FilterColumn $ \material criterion -> case getLast (criterion :: Last Text) of Nothing -> E.val True :: E.SqlExpr (E.Value Bool) Just needle -> (E.castString (material E.^. MaterialType) `E.ilike` (E.%) E.++. E.val needle E.++. (E.%)) - E.||. (E.castString (material E.^. MaterialDescription) `E.ilike` (E.%) E.++. E.val needle E.++. (E.%))) + E.||. (E.maybe (E.val mempty) (E.castString.esqueletoMarkupOutput) (material E.^. MaterialDescription) `E.ilike` (E.%) E.++. E.val needle E.++. (E.%))) ] , dbtFilterUI = \mPrev -> mconcat $ catMaybes [ Just $ prismAForm (singletonFilter "searchName") mPrev $ aopt textField (fslI MsgFilterMaterialNameSearch)