Skip to content

Commit 5c85e15

Browse files
committed
Handle absence of type hint
1 parent f2ee3ca commit 5c85e15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

temporalio/contrib/pydantic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ def from_payload(
7474
See
7575
https://docs.pydantic.dev/latest/api/type_adapter/#pydantic.type_adapter.TypeAdapter.validate_json.
7676
"""
77+
_type_hint = type_hint if type_hint is not None else Any
7778
try:
78-
return TypeAdapter(type_hint).validate_json(payload.data)
79+
return TypeAdapter(_type_hint).validate_json(payload.data)
7980
except ValidationError as err:
8081
raise RuntimeError("Failed parsing") from err
8182

0 commit comments

Comments
 (0)