Skip to content

Commit

Permalink
修复测试用例描述字段空值 (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-clan authored Aug 14, 2024
1 parent 4a45fb7 commit 9560dd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion httpfpt/schemas/case_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class StepsTearDownData(BaseModel):
class Steps(BaseModel):
name: str
case_id: str
description: str
description: str | None = None
is_run: bool | dict | None = None
mark: list[str] | None = None
retry: int | None = None
Expand Down
2 changes: 1 addition & 1 deletion httpfpt/utils/request/request_data_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def case_id(self) -> str:
def description(self) -> str | None:
try:
description = self.request_data['test_steps']['description']
if not isinstance(description, str):
if description and not isinstance(description, str):
raise RequestDataParseError(_error_msg('参数 test_steps:description 不是有效的 str 类型'))
except _RequestDataParamGetError:
description = None
Expand Down

0 comments on commit 9560dd9

Please sign in to comment.