From a8fbf2b510a8ebfd5e06146beac2eb2d7c127cbb Mon Sep 17 00:00:00 2001 From: hannathkadher Date: Mon, 10 Mar 2025 15:52:11 +0400 Subject: [PATCH] fixed issue in create space with space model --- src/space-model/services/space-model.service.ts | 1 + src/space/services/space-validation.service.ts | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/space-model/services/space-model.service.ts b/src/space-model/services/space-model.service.ts index e15c4aa..6efe5ff 100644 --- a/src/space-model/services/space-model.service.ts +++ b/src/space-model/services/space-model.service.ts @@ -481,6 +481,7 @@ export class SpaceModelService { await this.subspaceRepository.save(subspace); } + const subspaceAllocations = subspaceModel.productAllocations.map( (modelAllocation) => this.subspaceProductAllocationRepository.create({ diff --git a/src/space/services/space-validation.service.ts b/src/space/services/space-validation.service.ts index 5ac6f01..26e74f9 100644 --- a/src/space/services/space-validation.service.ts +++ b/src/space/services/space-validation.service.ts @@ -125,6 +125,12 @@ export class ValidationService { 'children', 'subspaces', 'tags', + 'productAllocations', + 'productAllocations.product', + 'productAllocations.tags', + 'subspaces.productAllocations', + 'subspaces.productAllocations.tags', + 'subspaces.productAllocations.product', 'subspaces.tags', 'subspaces.devices', ], @@ -175,6 +181,7 @@ export class ValidationService { 'subspaceModels', 'subspaceModels.productAllocations', 'subspaceModels.productAllocations.tags', + 'subspaceModels.productAllocations.product', 'productAllocations.product', 'productAllocations.tags', ],