diff --git a/CHANGELOG.md b/CHANGELOG.md index 4975564..12a52a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.10 + +* **Bugfix: Add `None` support in mapping `FileDataMeta` response** + ## 0.0.9 * **Support optionally exposing addition metadata around FileData** diff --git a/unstructured_platform_plugins/__version__.py b/unstructured_platform_plugins/__version__.py index 2215aa1..cdce53e 100644 --- a/unstructured_platform_plugins/__version__.py +++ b/unstructured_platform_plugins/__version__.py @@ -1 +1 @@ -__version__ = "0.0.9" # pragma: no cover +__version__ = "0.0.10" # pragma: no cover diff --git a/unstructured_platform_plugins/etl_uvicorn/api_generator.py b/unstructured_platform_plugins/etl_uvicorn/api_generator.py index d3d109b..b88d7af 100644 --- a/unstructured_platform_plugins/etl_uvicorn/api_generator.py +++ b/unstructured_platform_plugins/etl_uvicorn/api_generator.py @@ -81,6 +81,9 @@ def update_filedata_model(new_type) -> BaseModel: field_info = NewRecord.model_fields["contents"] if is_optional(new_type): field_info.default = None + if new_type is None: + new_type = type(None) + field_info.default = None new_record_model = create_model( NewRecord.__name__, contents=(new_type, field_info), __base__=NewRecord )