mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 09:34:54 +00:00
Merge pull request #291 from SyncrowIOT/bugfix/create-space-with-space-model
This commit is contained in:
@ -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',
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user