mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-25 15:17:55 +00:00
fix commissioning
This commit is contained in:
@@ -582,8 +582,8 @@ export class SpaceService {
|
||||
queryRunner: QueryRunner,
|
||||
): Promise<void> {
|
||||
try {
|
||||
if (space.subspaces || space.tags) {
|
||||
if (space.tags) {
|
||||
if (space.subspaces || space.productAllocations) {
|
||||
if (space.productAllocations) {
|
||||
await this.spaceProductAllocationService.unlinkModels(
|
||||
space,
|
||||
queryRunner,
|
||||
|
||||
@@ -118,7 +118,7 @@ export class TagService {
|
||||
await queryRunner.manager.update(
|
||||
this.tagRepository.target,
|
||||
{ uuid: tag.uuid },
|
||||
{ subspace, space: null },
|
||||
{ subspace },
|
||||
);
|
||||
tag.subspace = subspace;
|
||||
}
|
||||
@@ -127,10 +127,9 @@ export class TagService {
|
||||
await queryRunner.manager.update(
|
||||
this.tagRepository.target,
|
||||
{ uuid: tag.uuid },
|
||||
{ subspace: null, space: space },
|
||||
{ subspace: null },
|
||||
);
|
||||
tag.subspace = null;
|
||||
tag.space = space;
|
||||
}
|
||||
|
||||
return tag;
|
||||
@@ -367,7 +366,6 @@ export class TagService {
|
||||
where: [
|
||||
{
|
||||
tag,
|
||||
space: { uuid: spaceUuid },
|
||||
product: { uuid: productUuid },
|
||||
disabled: false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user