mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-06 11:27:04 +08:00
Fixed Kling: Check attributes of pydantic types. (#144)
This commit is contained in:
parent
87047e996f
commit
d78764dda9
@ -151,8 +151,9 @@ def is_valid_task_creation_response(response: KlingText2VideoResponse) -> bool:
|
||||
def is_valid_video_response(response: KlingText2VideoResponse) -> bool:
|
||||
"""Verifies that the response contains a task result with at least one video."""
|
||||
return (
|
||||
"task_result" in response.data
|
||||
and "videos" in response.data.task_result
|
||||
response.data is not None
|
||||
and response.data.task_result is not None
|
||||
and response.data.task_result.videos is not None
|
||||
and len(response.data.task_result.videos) > 0
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user