diff --git a/src/Model/Migration.hs b/src/Model/Migration.hs index dc0f83210..c04bf03ee 100644 --- a/src/Model/Migration.hs +++ b/src/Model/Migration.hs @@ -179,8 +179,7 @@ getMissingMigrations :: forall m m'. => ReaderT SqlBackend m (Map ManualMigration (ReaderT SqlBackend m' ())) getMissingMigrations = do $logDebugS "Migration" "Retrieve applied migrations" - appliedMigrations <- fmap (map E.unValue) . E.select . E.from $ \appliedMigration -> do - E.where_ $ appliedMigration E.^. AppliedMigrationMigration `E.in_` E.valList universeF + appliedMigrations <- fmap (map E.unValue) . E.select . E.from $ \appliedMigration -> do return $ appliedMigration E.^. AppliedMigrationMigration return $ customMigrations `Map.withoutKeys` Set.fromList appliedMigrations diff --git a/src/Utils/Form.hs b/src/Utils/Form.hs index 1a4bc3aa9..e79761885 100644 --- a/src/Utils/Form.hs +++ b/src/Utils/Form.hs @@ -966,10 +966,9 @@ multiSelectField' optMsg mkOpts = Field{..} fieldParse optlist _ = do let optlist' = filter notNull optlist readExternal <- view _olReadExternal <$> liftHandler mkOpts - return . maybe (Left . SomeMessage $ MsgInvalidEntry $ T.intercalate ", " optlist') (Right . Just) $ mapM readExternal optlist' - -- case mapM readExternal optlist' of - -- Nothing -> return $ Left $ SomeMessage $ MsgInvalidEntry $ T.intercalate ", " optlist' - -- res -> return $ Right res + return $ case mapM readExternal optlist' of + Nothing -> Left $ SomeMessage $ MsgInvalidEntry $ T.intercalate ", " optlist' + res -> Right res fieldView theId name attrs val isReq = do opts <- liftHandler mkOpts