withDelete option to TypeOrm (#10161)
fixes https://github.com/twentyhq/core-team-issues/issues/112
This commit is contained in:
@ -662,6 +662,10 @@ export class WorkspaceRepository<
|
|||||||
|
|
||||||
transformedOptions.where = await this.formatData(options.where);
|
transformedOptions.where = await this.formatData(options.where);
|
||||||
|
|
||||||
|
if (options.withDeleted) {
|
||||||
|
transformedOptions.withDeleted = true;
|
||||||
|
}
|
||||||
|
|
||||||
return transformedOptions;
|
return transformedOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,6 +77,7 @@ export class CreateCompanyAndContactService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const alreadyCreatedContacts = await personRepository.find({
|
const alreadyCreatedContacts = await personRepository.find({
|
||||||
|
withDeleted: true,
|
||||||
where: {
|
where: {
|
||||||
emails: { primaryEmail: Any(uniqueHandles) },
|
emails: { primaryEmail: Any(uniqueHandles) },
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user