Merge pull request #291 from SyncrowIOT/bugfix/create-space-with-space-model

This commit is contained in:
hannathkadher
2025-03-09 20:12:58 +04:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@ -165,10 +165,10 @@ export class ValidationService {
where: { uuid: spaceModelUuid },
relations: [
'subspaceModels',
'subspaceModels.tags',
'tags',
'subspaceModels.tags.product',
'tags.product',
'subspaceModels.productAllocations',
'subspaceModels.productAllocations.tags',
'productAllocations.product',
'productAllocations.tags',
],
});

View File

@ -106,7 +106,7 @@ export class SpaceService {
this.validateUniqueTags(allTags);
if (spaceModelUuid) {
const hasDependencies = subspaces?.length > 0 || tags?.length > 0;
if (!hasDependencies && !newSpace.spaceModel) {
if (!hasDependencies) {
await this.spaceModelService.linkToSpace(
newSpace,
spaceModel,