mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 02:36:19 +00:00
Merge pull request #245 from SyncrowIOT/bugfix/fixed-recursive-check-for-valid-subspace
Bugfix/fixed-recursive-check-for-valid-subspace
This commit is contained in:
@ -1019,6 +1019,7 @@ export class DeviceService {
|
|||||||
uuid: space.uuid,
|
uuid: space.uuid,
|
||||||
spaceName: space.spaceName,
|
spaceName: space.spaceName,
|
||||||
})),
|
})),
|
||||||
|
|
||||||
productUuid: device.productDevice.uuid,
|
productUuid: device.productDevice.uuid,
|
||||||
productType: device.productDevice.prodType,
|
productType: device.productDevice.prodType,
|
||||||
community: {
|
community: {
|
||||||
|
@ -58,7 +58,7 @@ export class SubSpaceService {
|
|||||||
return await queryRunner.manager.save(subspaces);
|
return await queryRunner.manager.save(subspaces);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new HttpException(
|
throw new HttpException(
|
||||||
'An unexpected error occurred while creating subspaces.',
|
`An unexpected error occurred while creating subspaces. ${error}`,
|
||||||
HttpStatus.INTERNAL_SERVER_ERROR,
|
HttpStatus.INTERNAL_SERVER_ERROR,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -98,9 +98,8 @@ export class SubSpaceService {
|
|||||||
otherTags?: CreateTagDto[],
|
otherTags?: CreateTagDto[],
|
||||||
): Promise<SubspaceEntity[]> {
|
): Promise<SubspaceEntity[]> {
|
||||||
try {
|
try {
|
||||||
await this.validateName(
|
this.checkForDuplicateNames(
|
||||||
addSubspaceDtos.map((dto) => dto.subspaceName),
|
addSubspaceDtos.map(({ subspaceName }) => subspaceName),
|
||||||
space,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const subspaceData = addSubspaceDtos.map((dto) => ({
|
const subspaceData = addSubspaceDtos.map((dto) => ({
|
||||||
|
Reference in New Issue
Block a user