mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 10:24:53 +00:00
tag fix
This commit is contained in:
@ -395,7 +395,7 @@ export class SpaceModelService {
|
||||
if (!spaceModel) {
|
||||
throw new HttpException('space model not found', HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
console.log(JSON.stringify(spaceModel));
|
||||
return spaceModel;
|
||||
}
|
||||
}
|
||||
|
||||
@ -409,13 +409,11 @@ export class TagModelService {
|
||||
HttpStatus.BAD_REQUEST,
|
||||
);
|
||||
}
|
||||
const tagSpace =
|
||||
spaceModel !== null ? spaceModel : subspaceModel.spaceModel;
|
||||
|
||||
return queryRunner.manager.create(TagModel, {
|
||||
tag: tagDto.tag,
|
||||
product: product.data,
|
||||
spaceModel: tagSpace,
|
||||
spaceModel: spaceModel,
|
||||
subspaceModel: subspaceModel,
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
@ -432,12 +432,11 @@ export class TagService {
|
||||
HttpStatus.BAD_REQUEST,
|
||||
);
|
||||
}
|
||||
const tagSpace = space !== null ? space : subspace.space;
|
||||
|
||||
return queryRunner.manager.create(TagEntity, {
|
||||
tag: tagDto.tag,
|
||||
product: product.data,
|
||||
space: tagSpace,
|
||||
space: space,
|
||||
subspace: subspace,
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user