From 2ed0731c99ff41b7dc3f3db16c5d3db287930629 Mon Sep 17 00:00:00 2001 From: alexeh Date: Thu, 14 Dec 2023 10:10:56 +0300 Subject: [PATCH] Cleaning --- api/src/modules/business-units/business-units.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/modules/business-units/business-units.service.ts b/api/src/modules/business-units/business-units.service.ts index 65c2f51b0e..2042f6cd9a 100644 --- a/api/src/modules/business-units/business-units.service.ts +++ b/api/src/modules/business-units/business-units.service.ts @@ -20,6 +20,7 @@ import { GetBusinessUnitTreeWithOptionsDto } from 'modules/business-units/dto/ge import { AdminRegionsService } from 'modules/admin-regions/admin-regions.service'; import { SuppliersService } from 'modules/suppliers/suppliers.service'; import { MaterialsService } from 'modules/materials/materials.service'; +import { In } from 'typeorm'; @Injectable() export class BusinessUnitsService extends AppBaseService< @@ -63,7 +64,7 @@ export class BusinessUnitsService extends AppBaseService< } async getBusinessUnitsById(ids: string[]): Promise { - return this.businessUnitRepository.findByIds(ids); + return this.businessUnitRepository.findBy({ id: In(ids) }); } async save( @@ -83,7 +84,6 @@ export class BusinessUnitsService extends AppBaseService< await this.businessUnitRepository.delete({}); } - // TODO: Implement Tree response similar to other entities as Admin-Regions async getTrees( businessUnitTreeOptions: GetBusinessUnitTreeWithOptionsDto, ): Promise {