fix(course): don't delete applications when deregistering

Fixes #648
This commit is contained in:
Gregor Kleen 2020-11-02 17:02:10 +01:00
parent 1c2c8fe3d9
commit b6664089f7

View File

@ -273,7 +273,6 @@ deleteApplicationFiles appId = deleteWhere [ CourseApplicationFileApplication ==
deregisterParticipant :: UserId -> CourseId -> DB ()
deregisterParticipant uid cid = do
deleteApplications uid cid
part <- fmap (assertM . has $ _entityVal . _courseParticipantState . _CourseParticipantActive) . getBy $ UniqueParticipant uid cid
forM_ part $ \(Entity partId CourseParticipant{}) -> do
update partId [CourseParticipantState =. CourseParticipantInactive False]