fix(build): accepting linter suggestions
This commit is contained in:
parent
69de44893c
commit
d25dd64eec
@ -129,7 +129,7 @@ postCAddUserR tid ssh csh = do
|
|||||||
let
|
let
|
||||||
users = Map.fromList . fmap (\act -> (crActIdent act, Just . view _1 $ crActUser act)) $ Set.toList confirmedActs
|
users = Map.fromList . fmap (\act -> (crActIdent act, Just . view _1 $ crActUser act)) $ Set.toList confirmedActs
|
||||||
tutActs = Set.filter (is _CourseRegisterActionAddTutorialMemberData) confirmedActs
|
tutActs = Set.filter (is _CourseRegisterActionAddTutorialMemberData) confirmedActs
|
||||||
actTutorial = fmap crActTutorial $ Set.lookupMin tutActs -- tutorial ident must be the same for every added member!
|
actTutorial = crActTutorial <$> Set.lookupMin tutActs -- tutorial ident must be the same for every added member!
|
||||||
registeredUsers <- registerUsers cid users
|
registeredUsers <- registerUsers cid users
|
||||||
forM_ actTutorial $ \tutName -> do
|
forM_ actTutorial $ \tutName -> do
|
||||||
tutId <- upsertNewTutorial cid tutName
|
tutId <- upsertNewTutorial cid tutName
|
||||||
@ -287,7 +287,7 @@ upsertNewTutorial cid tutorialName = do
|
|||||||
|
|
||||||
registerTutorialMembers :: TutorialId -> Set UserId -> Handler ()
|
registerTutorialMembers :: TutorialId -> Set UserId -> Handler ()
|
||||||
registerTutorialMembers tutId (Set.toList -> users) = runDB $ do
|
registerTutorialMembers tutId (Set.toList -> users) = runDB $ do
|
||||||
prevParticipants <- fmap Set.fromList $ selectList [TutorialParticipantUser <-. users, TutorialParticipantTutorial ==. tutId] []
|
prevParticipants <- Set.fromList <$> selectList [TutorialParticipantUser <-. users, TutorialParticipantTutorial ==. tutId] []
|
||||||
participants <- fmap Set.fromList . for users $ \tutorialParticipantUser -> upsert
|
participants <- fmap Set.fromList . for users $ \tutorialParticipantUser -> upsert
|
||||||
TutorialParticipant { tutorialParticipantTutorial = tutId, .. }
|
TutorialParticipant { tutorialParticipantTutorial = tutId, .. }
|
||||||
[]
|
[]
|
||||||
|
|||||||
Reference in New Issue
Block a user