This commit is contained in:
hannathkadher
2025-02-17 22:27:35 +04:00
parent 61a85789d1
commit 07d31bb8bd

View File

@ -72,7 +72,7 @@ export class SubSpaceModelService {
subSpaceModelDtos: CreateSubspaceModelDto[], subSpaceModelDtos: CreateSubspaceModelDto[],
spaceModel: SpaceModelEntity, spaceModel: SpaceModelEntity,
queryRunner: QueryRunner, queryRunner: QueryRunner,
otherTags?: CreateTagModelDto[], otherTags?: ProcessTagDto[],
): Promise<SubspaceModelEntity[]> { ): Promise<SubspaceModelEntity[]> {
try { try {
await this.validateInputDtos(subSpaceModelDtos, spaceModel); await this.validateInputDtos(subSpaceModelDtos, spaceModel);
@ -94,13 +94,13 @@ export class SubSpaceModelService {
.filter((_, i) => i !== index) .filter((_, i) => i !== index)
.flatMap((otherDto) => otherDto.tags || []); .flatMap((otherDto) => otherDto.tags || []);
if (dto.tags && dto.tags.length > 0) { if (dto.tags && dto.tags.length > 0) {
subspace.tags = await this.tagModelService.createTags( /* subspace.tags = await this.tagModelService.createTags(
dto.tags, dto.tags,
queryRunner, queryRunner,
null, null,
subspace, subspace,
[...(otherTags || []), ...otherDtoTags], [...(otherTags || []), ...otherDtoTags],
); ); */
} }
}), }),
); );
@ -213,11 +213,13 @@ export class SubSpaceModelService {
queryRunner: QueryRunner, queryRunner: QueryRunner,
): Promise<SubspaceModelEntity> { ): Promise<SubspaceModelEntity> {
try { try {
const createTagDtos: CreateTagModelDto[] = const createTagDtos: ProcessTagDto[] =
subspace.tags?.map((tag) => ({ subspace.tags?.map((tag) => ({
tag: tag.tag, name: tag.tag,
uuid: tag.uuid, uuid: tag.uuid,
productUuid: tag.productUuid, productUuid: tag.productUuid,
projectUuid: null,
})) || []; })) || [];
const [createdSubspaceModel] = await this.createSubSpaceModels( const [createdSubspaceModel] = await this.createSubSpaceModels(