Skip to content

Commit

Permalink
Fix typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
faph committed May 21, 2024
1 parent 0e5a209 commit 54694a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/py_avro_schema/_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ def __init__(self, py_type: Type[pydantic.BaseModel], namespace: Optional[str] =
super().__init__(py_type, namespace=namespace, options=options)
if Option.USE_CLASS_ALIAS in self.options:
# TODO: Validate that model config's title is a valid Avro record name
self.name = py_type.model_config.get("title", self.name)
self.name = py_type.model_config.get("title") or self.name
self.py_fields = py_type.model_fields
self.record_fields = [self._record_field(name, field) for name, field in self.py_fields.items()]

Expand Down

0 comments on commit 54694a7

Please sign in to comment.