fixed issues in fetching orphan community

This commit is contained in:
hannathkadher
2024-12-31 12:44:26 +04:00
parent 0542d13279
commit 172d17950f
2 changed files with 2 additions and 4 deletions

View File

@ -1,7 +1,6 @@
import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import {
IsArray,
IsBoolean,
IsNotEmpty,
IsNumber,

View File

@ -79,7 +79,6 @@ export class SpaceService {
: null;
try {
console.log('jnkjn', community);
const space = queryRunner.manager.create(SpaceEntity, {
...addSpaceDto,
spaceModel,
@ -254,7 +253,7 @@ export class SpaceService {
const orphanSpace = await this.spaceRepository.findOne({
where: {
community: {
uuid: `${ORPHAN_COMMUNITY_NAME}-${project.name}`,
name: `${ORPHAN_COMMUNITY_NAME}-${project.name}`,
},
spaceName: ORPHAN_SPACE_NAME,
},
@ -271,7 +270,7 @@ export class SpaceService {
throw error;
}
throw new HttpException(
'An error occurred while deleting the space',
`An error occurred while deleting the space ${error.message}`,
HttpStatus.INTERNAL_SERVER_ERROR,
);
}