From 1403a670e3768793e83d0bdb9ddd3b36166338a5 Mon Sep 17 00:00:00 2001 From: hannathkadher Date: Tue, 11 Mar 2025 22:11:25 +0400 Subject: [PATCH] added validation for space model --- src/space/services/space-validation.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/space/services/space-validation.service.ts b/src/space/services/space-validation.service.ts index f8db191..dff32f8 100644 --- a/src/space/services/space-validation.service.ts +++ b/src/space/services/space-validation.service.ts @@ -45,14 +45,15 @@ export class ValidationService { await this.communityService.validateProject(projectUuid); const spaces = await this.spaceRepository.find({ where: { uuid: In(spacesUuids), disabled: false }, - relations: ['devices', 'subspaces', 'productAllocations'], + relations: ['devices', 'subspaces', 'productAllocations', 'spaceModel'], }); const hasInvalidSpaces = spaces.some( (space) => space.devices.length > 0 || space.subspaces.length > 0 || - space.productAllocations.length > 0, + space.productAllocations.length > 0 || + space.spaceModel, ); if (hasInvalidSpaces) {