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) {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user