fix commissioning

This commit is contained in:
hannathkadher
2025-04-21 10:58:14 +04:00
parent c677be400c
commit ed3c526efd
11 changed files with 214 additions and 64 deletions
+2 -2
View File
@@ -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,
+2 -4
View File
@@ -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,
},