Skip to content

Commit

Permalink
dsl: fix for derived fields without type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
aszs committed Oct 29, 2024
1 parent c5cf514 commit b38377b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tosca-package/tosca/_tosca.py
Original file line number Diff line number Diff line change
Expand Up @@ -1974,7 +1974,7 @@ def _make_dataclass(cls):
base_field = cls.__dataclass_fields__.get(name)
if base_field:
field = _Tosca_Field(
base_field._tosca_field_type, value, owner=cls
getattr(base_field, "_tosca_field_type", ToscaFieldType.property), value, owner=cls
)
# avoid type(None) or type(())
field.type = base_field.type if not value else type(value)
Expand Down

0 comments on commit b38377b

Please sign in to comment.