This commit is contained in:
hannathkadher
2025-01-29 14:02:26 +04:00
parent 3366f525ef
commit 64a056cf95
3 changed files with 3 additions and 6 deletions

View File

@ -395,7 +395,7 @@ export class SpaceModelService {
if (!spaceModel) { if (!spaceModel) {
throw new HttpException('space model not found', HttpStatus.NOT_FOUND); throw new HttpException('space model not found', HttpStatus.NOT_FOUND);
} }
console.log(JSON.stringify(spaceModel));
return spaceModel; return spaceModel;
} }
} }

View File

@ -409,13 +409,11 @@ export class TagModelService {
HttpStatus.BAD_REQUEST, HttpStatus.BAD_REQUEST,
); );
} }
const tagSpace =
spaceModel !== null ? spaceModel : subspaceModel.spaceModel;
return queryRunner.manager.create(TagModel, { return queryRunner.manager.create(TagModel, {
tag: tagDto.tag, tag: tagDto.tag,
product: product.data, product: product.data,
spaceModel: tagSpace, spaceModel: spaceModel,
subspaceModel: subspaceModel, subspaceModel: subspaceModel,
}); });
} catch (error) { } catch (error) {

View File

@ -432,12 +432,11 @@ export class TagService {
HttpStatus.BAD_REQUEST, HttpStatus.BAD_REQUEST,
); );
} }
const tagSpace = space !== null ? space : subspace.space;
return queryRunner.manager.create(TagEntity, { return queryRunner.manager.create(TagEntity, {
tag: tagDto.tag, tag: tagDto.tag,
product: product.data, product: product.data,
space: tagSpace, space: space,
subspace: subspace, subspace: subspace,
}); });
} catch (error) { } catch (error) {