mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 18:27:05 +00:00
fixed the unlinking
This commit is contained in:
@ -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(
|
||||
|
Reference in New Issue
Block a user