fix create space

This commit is contained in:
hannathkadher
2025-03-09 20:12:19 +04:00
parent 63f1f7a7c0
commit 054df46936
2 changed files with 5 additions and 5 deletions

View File

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

View File

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