Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bcalvert-graft committed Jan 19, 2025
1 parent db8f0c9 commit b2e8f7c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sematic/types/types/dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,9 @@ def _dataclass_from_json_encodable(value: Any, type_: Any) -> Any:
)

kwargs = {}

fields: Dict[str, dataclasses.Field] = root_type.__dataclass_fields__

for name, field in fields.items():
field_type = resolve_type(type_, name)
field_names = [field.name for field in dataclasses.fields(root_type)]
for name in field_names:
field_type = resolve_type(root_type, name)
if name in types:
field_type = type_from_json_encodable(types[name])

Expand Down

0 comments on commit b2e8f7c

Please sign in to comment.