Skip to content

Commit dcc05e0

Browse files
committed
refactor: oFFICIAL_MCP_CATEGORY_NAME
1 parent 077ae0b commit dcc05e0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • src/dashboard/apigateway/apigateway/apps/mcp_server

src/dashboard/apigateway/apigateway/apps/mcp_server/tasks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
from apigateway.apps.mcp_server.constants import (
2929
ADD_STAGE_MCP_SERVER_PERMISSIONS_BEFORE_RELEASE_UPDATE_TASK_NAME,
30+
OFFICIAL_MCP_CATEGORY_NAME,
3031
RECONCILE_STAGE_MCP_SERVER_PERMISSIONS_AFTER_RELEASE_TASK_NAME,
3132
)
3233
from apigateway.apps.mcp_server.models import MCPServer, MCPServerCategory
@@ -449,7 +450,7 @@ def sync_mcp_server_after_release(
449450
@shared_task(name="apigateway.apps.mcp_server.tasks.refresh_official_mcp_server_category", ignore_result=True)
450451
def refresh_official_mcp_server_category() -> None:
451452
"""定时给官方网关下的 MCP Server 补齐「官方」分类,只补不删。"""
452-
official_category = MCPServerCategory.objects.filter(name="Official", is_active=True).first()
453+
official_category = MCPServerCategory.objects.filter(name=OFFICIAL_MCP_CATEGORY_NAME, is_active=True).first()
453454
if official_category is None:
454455
return
455456

0 commit comments

Comments
 (0)