Apply 1 suggestion(s) to 1 file(s)

This commit is contained in:
Sarah Vaupel 2021-06-25 12:23:16 +00:00 committed by Gregor Kleen
parent bc09bedb84
commit 617eb7ff94

View File

@ -150,7 +150,7 @@ getMaterialListR tid ssh csh = do
, dbtFilter = mconcat
[ (singletonMap "may-access" . mkFilterProjectedPost $ \(Any b) dbr
-> (== b) <$> hasReadAccessTo (matLink . materialName $ row2material dbr) :: DB Bool)
, (singletonMap "searchName". FilterColumn $ \material criterion -> case getLast (criterion :: Last Text) of
, (singletonMap "name". FilterColumn $ \material criterion -> case getLast (criterion :: Last Text) of
Nothing -> E.val True :: E.SqlExpr (E.Value Bool)
Just needle -> (E.castString (material E.^. MaterialName) `E.ilike` (E.%) E.++. E.val needle E.++. (E.%)))
, (singletonMap "type-and-description". FilterColumn $ \material criterion -> case getLast (criterion :: Last Text) of