mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-06 14:17:12 +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:
|
def is_valid_video_response(response: KlingText2VideoResponse) -> bool:
|
||||||
"""Verifies that the response contains a task result with at least one video."""
|
"""Verifies that the response contains a task result with at least one video."""
|
||||||
return (
|
return (
|
||||||
"task_result" in response.data
|
response.data is not None
|
||||||
and "videos" in response.data.task_result
|
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
|
and len(response.data.task_result.videos) > 0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user