fix(skills-admin): market 项加 publish_records 字段,列表"已发布"标识正确显示
修复顶部卡片(已发布=50)与列表行(市场=未发布)不一致问题: 列表行 isPublished 仅看 skill.publish_records[], market_apps 项无该字段故一直显示"未发布"。 改为 market_app_to_skill_dict 中按 status 注入 publish_records。
This commit is contained in:
1 parent
8942339744
commit
0e6f1931e1
1 file changed
+2
@@ -84,6 +84,8 @@ def market_app_to_skill_dict(app: "MarketApp") -> dict:
|
||||
"created_at": app.created_at.isoformat() if getattr(app, "created_at", None) else None,
|
||||
"updated_at": getattr(app, "updated_at", None).isoformat() if getattr(app, "updated_at", None) else None,
|
||||
"source": "market",
|
||||
# 让前端 isPublished(skill) 能正确识别 market 已发布项
|
||||
"publish_records": [{"status": "published"}] if status == "published" else [],
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user