Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/zh-CN/

## [Unreleased]

### Fixed

- 修复插件元数据不合法时 metadata.json 为空的问题

## [4.0.8] - 2024-11-20

### Fixed
Expand Down
5 changes: 4 additions & 1 deletion src/providers/docker_test/plugin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ def default(self, o):
"supported_adapters": plugin.metadata.supported_adapters,
}}
with open("metadata.json", "w", encoding="utf-8") as f:
f.write(f"{{json.dumps(metadata, cls=SetEncoder)}}")
try:
f.write(f"{{json.dumps(metadata, cls=SetEncoder)}}")
except Exception:
f.write("{{}}")

if plugin.metadata.config and not issubclass(plugin.metadata.config, BaseModel):
logger.error("插件配置项不是 Pydantic BaseModel 的子类")
Expand Down
Loading