diff --git a/src/space/services/space.service.ts b/src/space/services/space.service.ts index b575ab6..0815525 100644 --- a/src/space/services/space.service.ts +++ b/src/space/services/space.service.ts @@ -388,15 +388,15 @@ export class SpaceService { this.updateSpaceProperties(space, updateSpaceDto); - await queryRunner.manager.save(space); - const hasSubspace = updateSpaceDto.subspace?.length > 0; const hasTags = updateSpaceDto.tags?.length > 0; if (hasSubspace || hasTags) { + 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(