diff --git a/src/Foundation.hs b/src/Foundation.hs index 86ef9e02f..fe78569e9 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -3529,12 +3529,17 @@ upsertCampusUser ldapData Creds{..} = do Nothing -> [] ) [] case oldFs of - [oldF] -> update oldF [ StudyFeaturesUpdated =. now - , StudyFeaturesValid =. True - , StudyFeaturesField =. studyFeaturesField - , StudyFeaturesSuperField =. studyFeaturesSuperField - ] - _other -> insert_ f + [oldF] -> update oldF + [ StudyFeaturesUpdated =. now + , StudyFeaturesValid =. True + , StudyFeaturesField =. studyFeaturesField + , StudyFeaturesSuperField =. studyFeaturesSuperField + ] + _other -> void $ upsert f + [ StudyFeaturesUpdated =. now + , StudyFeaturesValid =. True + , StudyFeaturesSuperField =. studyFeaturesSuperField + ] associateUserSchoolsByTerms userId let