From c8d72a90b64403ff88f756217373edea6ca80788 Mon Sep 17 00:00:00 2001 From: faris Aljohari <83524184+farisaljohari@users.noreply.github.com> Date: Mon, 10 Mar 2025 10:42:00 +0300 Subject: [PATCH] remove old tag flow --- src/space/services/space.service.ts | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/space/services/space.service.ts b/src/space/services/space.service.ts index 73ee5ee..ec2d7a9 100644 --- a/src/space/services/space.service.ts +++ b/src/space/services/space.service.ts @@ -520,23 +520,16 @@ export class SpaceService { } const hasSubspace = updateSpaceDto.subspace?.length > 0; - const hasTags = updateSpaceDto.tags?.length > 0; - if (hasSubspace || hasTags) { + if (hasSubspace) { space.spaceModel = null; - await this.tagService.unlinkModels(space.tags, queryRunner); await this.subSpaceService.unlinkModels(space.subspaces, queryRunner); } await queryRunner.manager.save(space); if (hasSubspace) { - const modifiedSubspaces = this.tagService.getModifiedSubspaces( - updateSpaceDto.tags, - updateSpaceDto.subspace, - ); - await this.subSpaceService.modifySubSpace( - modifiedSubspaces, + updateSpaceDto.subspace, queryRunner, space, projectUuid, @@ -544,18 +537,6 @@ export class SpaceService { ); } - if (hasTags) { - const spaceTagsAfterMove = this.tagService.getSubspaceTagsToBeAdded( - updateSpaceDto.tags, - updateSpaceDto.subspace, - ); - - await this.tagService.modifyTags( - spaceTagsAfterMove, - queryRunner, - space, - ); - } if (updateSpaceDto.tags) { await this.spaceProductAllocationService.updateSpaceProductAllocations( updateSpaceDto.tags,