mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 18:44:54 +00:00
fixed moving device
This commit is contained in:
@ -356,16 +356,26 @@ export class SpaceService {
|
||||
}
|
||||
|
||||
if (hasSubspace) {
|
||||
await this.subSpaceService.modifySubSpace(
|
||||
const modifiedSubspaces = this.tagService.getModifiedSubspaces(
|
||||
updateSpaceDto.tags,
|
||||
updateSpaceDto.subspace,
|
||||
);
|
||||
|
||||
await this.subSpaceService.modifySubSpace(
|
||||
modifiedSubspaces,
|
||||
queryRunner,
|
||||
space,
|
||||
);
|
||||
}
|
||||
|
||||
if (hasTags) {
|
||||
await this.tagService.modifyTags(
|
||||
const spaceTagsAfterMove = this.tagService.getSubspaceTagsToBeAdded(
|
||||
updateSpaceDto.tags,
|
||||
updateSpaceDto.subspace,
|
||||
);
|
||||
|
||||
await this.tagService.modifyTags(
|
||||
spaceTagsAfterMove,
|
||||
queryRunner,
|
||||
space,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user