fix(study-features): account for existing StudyFeatures
This commit is contained in:
parent
bf9f210b93
commit
b6cada43f2
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user