Skip to content

Commit

Permalink
fix: 修复返回协议问题 #7603
Browse files Browse the repository at this point in the history
  • Loading branch information
guohelu committed Nov 19, 2024
1 parent 95992a3 commit 21b206e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gcloud/apigw/views/get_template_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ def get_template_list(request, project_id):
if allowed:
template_info["auth_actions"].append(action)

templates_labels = TemplateLabelRelation.objects.fetch_templates_labels(template_id_list)
for obj in template_list:
obj["template_labels"] = templates_labels.get(obj["id"], [])
if label_names:
templates_labels = TemplateLabelRelation.objects.fetch_templates_labels(template_id_list)
for obj in template_list:
obj["template_labels"] = templates_labels.get(obj["id"], [])

return {"result": True, "data": template_list, "code": err_code.SUCCESS.code}

0 comments on commit 21b206e

Please sign in to comment.