diff --git a/src/Handler/Utils/Form.hs b/src/Handler/Utils/Form.hs index 21ff05efe..c956c16b7 100644 --- a/src/Handler/Utils/Form.hs +++ b/src/Handler/Utils/Form.hs @@ -224,7 +224,7 @@ studyFeaturesPrimaryFieldFor oldFeatures mbuid = selectField $ do E.where_ $ ((feature E.^. StudyFeaturesId) `E.in_` E.valList oldFeatures) E.||. isPrimaryActiveUserStudyFeature feature return (feature E.^. StudyFeaturesId, degree, field) - mr <- liftHandler . getMessageRender + mr <- getMessageRender mkOptionList . nonEmptyOptions (mr MsgNoPrimaryStudyField) <$> mapM (procOptions mr) rawOptions where isPrimaryActiveUserStudyFeature feature = case mbuid of @@ -233,11 +233,11 @@ studyFeaturesPrimaryFieldFor oldFeatures mbuid = selectField $ do E.&&. feature E.^. StudyFeaturesValid E.==. E.val True E.&&. feature E.^. StudyFeaturesType E.==. E.val FieldPrimary - procOptions :: (StudyDegreeTerm -> Text) -> (E.Value StudyFeaturesId, Entity StudyDegree, Entity StudyTerms) -> Handler (Option (Maybe StudyFeaturesId)) + procOptions :: _ -> (E.Value StudyFeaturesId, Entity StudyDegree, Entity StudyTerms) -> Handler (Option (Maybe StudyFeaturesId)) procOptions mr (E.Value sfid, Entity dgid sdegree, Entity stid sterm) = do cfid <- encrypt sfid return Option - { optionDisplay = mr $ StudyDegreeTerm sdegree sterm + { optionDisplay = mr $ SomeMessage $ StudyDegreeTerm sdegree sterm , optionInternalValue = Just sfid , optionExternalValue = toPathPiece (cfid :: CryptoID UUID StudyFeaturesId) }