diff --git a/server/src/domain/partner/partner.service.ts b/server/src/domain/partner/partner.service.ts index 6486df7426..d870dc115f 100644 --- a/server/src/domain/partner/partner.service.ts +++ b/server/src/domain/partner/partner.service.ts @@ -32,7 +32,10 @@ export class PartnerService { async getAll(authUser: AuthUserDto, direction: PartnerDirection): Promise { const partners = await this.repository.getAll(authUser.id); const key = direction === PartnerDirection.SharedBy ? 'sharedById' : 'sharedWithId'; - return partners.filter((partner) => partner[key] === authUser.id).map((partner) => this.map(partner, direction)); + return partners + .filter((partner) => partner.sharedBy && partner.sharedWith) // Filter out soft deleted users + .filter((partner) => partner[key] === authUser.id) + .map((partner) => this.map(partner, direction)); } private map(partner: PartnerEntity, direction: PartnerDirection): UserResponseDto {