Skip to content

Commit

Permalink
fix: 修复插件元数据缺失时不报错的问题 (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
he0119 authored Jan 6, 2025
1 parent 31f3f0c commit a42692e
Show file tree
Hide file tree
Showing 10 changed files with 1,073 additions and 794 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/zh-CN/
### Fixed

- 修复在评论议题后立即关闭拉取请求,拉取请求会被再次创建的问题
- 修复插件元数据缺失时不报错的问题

## [4.2.3] - 2024-12-30

Expand Down
4 changes: 2 additions & 2 deletions src/providers/validation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def plugin_test_metadata_validator(
if context is None:
raise PydanticCustomError("validation_context", "未获取到验证上下文")

if v is None:
if not v:
raise PydanticCustomError(
"plugin.metadata",
"插件无法获取到元数据",
Expand Down Expand Up @@ -383,7 +383,7 @@ class ValidationDict(BaseModel):

@property
def valid(self) -> bool:
return not self.errors
return self.info is not None

@property
def name(self) -> str:
Expand Down
Loading

0 comments on commit a42692e

Please sign in to comment.