mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-11 07:38:49 +00:00
Merge pull request #287 from SyncrowIOT/bugfix/fix-overwrite-of-space-linking
This commit is contained in:
@ -356,7 +356,11 @@ export class SpaceModelService {
|
|||||||
relations: [
|
relations: [
|
||||||
'productAllocations',
|
'productAllocations',
|
||||||
'subspaceModels',
|
'subspaceModels',
|
||||||
|
'productAllocations.product',
|
||||||
|
'productAllocations.tags',
|
||||||
'subspaceModels.productAllocations',
|
'subspaceModels.productAllocations',
|
||||||
|
'subspaceModels.productAllocations.product',
|
||||||
|
'subspaceModels.productAllocations.tags',
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -374,7 +378,11 @@ export class SpaceModelService {
|
|||||||
'devices',
|
'devices',
|
||||||
'subspaces',
|
'subspaces',
|
||||||
'productAllocations',
|
'productAllocations',
|
||||||
|
'productAllocations.product',
|
||||||
|
'productAllocations.tags',
|
||||||
'subspaces.productAllocations',
|
'subspaces.productAllocations',
|
||||||
|
'subspaces.productAllocations.product',
|
||||||
|
'subspaces.productAllocations.product.tags',
|
||||||
'community',
|
'community',
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@ -426,7 +434,6 @@ export class SpaceModelService {
|
|||||||
} else {
|
} else {
|
||||||
await this.spaceRepository.save(space);
|
await this.spaceRepository.save(space);
|
||||||
}
|
}
|
||||||
|
|
||||||
const spaceProductAllocations = spaceModel.productAllocations.map(
|
const spaceProductAllocations = spaceModel.productAllocations.map(
|
||||||
(modelAllocation) =>
|
(modelAllocation) =>
|
||||||
this.spaceProductAllocationRepository.create({
|
this.spaceProductAllocationRepository.create({
|
||||||
|
Reference in New Issue
Block a user