Skip to content

Commit

Permalink
fix: 删除冗余判断 TencentBlueKing#7626
Browse files Browse the repository at this point in the history
  • Loading branch information
guohelu committed Dec 10, 2024
1 parent 113c6d6 commit 3f16485
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions gcloud/contrib/template_market/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ def create(self, request, *args, **kwargs):
logging.exception(f"Template with project_id {project_id} and template_id {template_id} not found.")
return Response({"result": False, "message": "Template not found", "code": err_code.CONTENT_NOT_EXIST.code})

if TemplateSharedRecord.objects.filter(project_id=project_id, template_id=template_id).exists():
logging.warning(f"Template with project_id {project_id} and template_id {template_id} has been shared.")
return Response(
{"result": False, "message": "Template has been shared", "code": err_code.OPERATION_FAIL.code}
)

url = self._get_market_routing("sre_scene/flow_template_scene/")

data = {
Expand Down

0 comments on commit 3f16485

Please sign in to comment.