diff --git a/src/space/services/space.service.ts b/src/space/services/space.service.ts index f61a6e8..a8e166a 100644 --- a/src/space/services/space.service.ts +++ b/src/space/services/space.service.ts @@ -490,23 +490,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, @@ -514,18 +507,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,