diff --git a/src/Handler/Utils/Table/Pagination.hs b/src/Handler/Utils/Table/Pagination.hs index 50e666ed0..cfb7b1231 100644 --- a/src/Handler/Utils/Table/Pagination.hs +++ b/src/Handler/Utils/Table/Pagination.hs @@ -1066,6 +1066,8 @@ dbTable PSValidator{..} dbtable@DBTable{ dbtIdent = dbtIdent'@(toPathPiece -> db <|> piInput psShortcircuit <- (== Just dbtIdent') <$> lookupCustomHeader HeaderDBTableShortcircuit + lch <- lookupCustomHeader HeaderDBTableShortcircuit + $logErrorS "DBShortcircuit" $ fromMaybe mempty lch <> " and also " <> tshow psShortcircuit let -- adjustPI = over _piSorting $ guardOnM doSorting -- probably not neccessary; not displaying the links should be enough for now diff --git a/src/Model/Types/Lms.hs b/src/Model/Types/Lms.hs index d9a58a646..3a5ae6ea4 100644 --- a/src/Model/Types/Lms.hs +++ b/src/Model/Types/Lms.hs @@ -12,6 +12,7 @@ import Database.Persist.Sql import qualified Database.Esqueleto.Legacy as E import qualified Data.Csv as Csv import qualified Data.Time.Format as Time +import Data.Time.Format.ISO8601 (iso8601ParseM) import Utils.Lens.TH newtype LmsIdent = LmsIdent { getLmsIdent :: Text } @@ -54,7 +55,7 @@ instance Csv.FromField LmsBool where parseField i | i == "0" = pure $ LmsBool False | i == "1" = pure $ LmsBool True - | otherwise = empty + | otherwise = mempty -- | LMS interface requires day format not compliant with iso8601 newtype LmsDay = LmsDay { lms2day :: Day } @@ -76,4 +77,5 @@ instance Csv.FromField LmsDay where parseField i = do s <- Csv.parseField i d <- Time.parseTimeM True Time.defaultTimeLocale lmsDayFormat s + <|> iso8601ParseM s -- Know-How AG considers supplying iso8601 dates in the future return $ LmsDay d