From b6664089f75dcb3b2c89dbd2941c064e8aa86404 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 2 Nov 2020 17:02:10 +0100 Subject: [PATCH] fix(course): don't delete applications when deregistering Fixes #648 --- src/Handler/Course/Register.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Handler/Course/Register.hs b/src/Handler/Course/Register.hs index 92297d3d9..c4e770f9f 100644 --- a/src/Handler/Course/Register.hs +++ b/src/Handler/Course/Register.hs @@ -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]