diff --git a/src/Handler/ExternalExam/Correct.hs b/src/Handler/ExternalExam/Correct.hs index b3ff402c8..4febbc936 100644 --- a/src/Handler/ExternalExam/Correct.hs +++ b/src/Handler/ExternalExam/Correct.hs @@ -75,13 +75,13 @@ postEECorrectR tid ssh coursen examn = do matches <- case euid of Right uid -> lift . E.select . E.from $ \user -> E.where_ (user E.^. UserId E.==. E.val uid) >> return user Left ident -> - let pdnf = PredDNF . Set.fromList $ (impureNonNull . Set.fromList . pure . PLVariable) <$> + let pdnf = PredDNF . Set.fromList $ impureNonNull . Set.fromList . pure . PLVariable <$> [ GuessUserMatrikelnummer (ident :: UserMatriculation) , GuessUserDisplayName (ident :: UserDisplayName) , GuessUserSurname (ident :: UserSurname) , GuessUserFirstName (ident :: UserFirstName) ] - in lift (guessUser pdnf $ Just $ maxCountUserMatches+1) >>= return . maybe [] (either NonEmpty.toList pure) + in (maybe [] (either NonEmpty.toList pure)) <$> lift (guessUser pdnf $ Just $ maxCountUserMatches+1) if | is _Nothing ciqResults, is _Nothing ciqGrade -> do