Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复插件元数据缺失时不报错的问题 #350

Merged
merged 4 commits into from
Jan 6, 2025
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
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
Loading