diff --git a/packages/core/src/services/CalloutsService.ts b/packages/core/src/services/CalloutsService.ts index d8ba207fa..53458100f 100644 --- a/packages/core/src/services/CalloutsService.ts +++ b/packages/core/src/services/CalloutsService.ts @@ -328,6 +328,11 @@ class CalloutsService { { contactId: contact.id }, { contactId: null } ); + + await getRepository(CalloutResponse).update( + { assigneeId: contact.id }, + { assigneeId: null } + ); } /** diff --git a/packages/core/src/services/ContactsService.ts b/packages/core/src/services/ContactsService.ts index d950c9467..ac68106b6 100644 --- a/packages/core/src/services/ContactsService.ts +++ b/packages/core/src/services/ContactsService.ts @@ -34,6 +34,7 @@ import { Contact, ContactProfile, ContactRole, + ContactTagAssignment, GiftFlow, Password, Project, @@ -421,6 +422,9 @@ class ContactsService { .getRepository(GiftFlow) .update({ gifteeId: contact.id }, { gifteeId: null }); + await em + .getRepository(ContactTagAssignment) + .delete({ contactId: contact.id }); await em.getRepository(ContactRole).delete({ contactId: contact.id }); await em.getRepository(ContactProfile).delete({ contactId: contact.id }); await em.getRepository(Contact).delete(contact.id);