From bf1c057763499c11e45252b89addaddd04f50667 Mon Sep 17 00:00:00 2001 From: leonnicolas Date: Fri, 11 Dec 2020 16:39:21 +0100 Subject: [PATCH] bug updateParticipant with workshopIds --- src/datasources/db/participantAPI.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datasources/db/participantAPI.ts b/src/datasources/db/participantAPI.ts index 8efd5b8..ce01f09 100644 --- a/src/datasources/db/participantAPI.ts +++ b/src/datasources/db/participantAPI.ts @@ -230,7 +230,7 @@ export class ParticipantAPI extends DataSource { .createQueryBuilder('w') .relation(Participant, 'workshopIds') .of(participant.id) - .add(workshops); + .addAndRemove(workshops, await this.workshopsByParticipantId(participant.id)); }); !keepLock && await this.unlockParticipant(participant.id, userId); return await this.participantById(participant.id);