mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 15:17:41 +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 },
|
||||
relations: [
|
||||
'subspaceModels',
|
||||
'subspaceModels.tags',
|
||||
'tags',
|
||||
'subspaceModels.tags.product',
|
||||
'tags.product',
|
||||
'subspaceModels.productAllocations',
|
||||
'subspaceModels.productAllocations.tags',
|
||||
'productAllocations.product',
|
||||
'productAllocations.tags',
|
||||
],
|
||||
});
|
||||
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user