Skip to content

Commit 9506b55

Browse files
committed
fix: populate participants when deleting a study participant
1 parent e7a6568 commit 9506b55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/backend/src/research/study-participants/study-participants.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class StudyParticipantsService {
2525

2626
async delete(studyParticipant: StudyParticipantMutationDto) {
2727
const participantRef = this.em.getReference(Participant, studyParticipant.participantId);
28-
const study = await this.studyRepository.findOneOrFail(studyParticipant.studyId);
28+
const study = await this.studyRepository.findOneOrFail(studyParticipant.studyId, { populate: ["participants"] });
2929
study.participants.remove(participantRef);
3030

3131
await this.em.flush();

0 commit comments

Comments
 (0)