diff --git a/CHANGELOG.md b/CHANGELOG.md index c884c7ab..758c6905 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ nylas-python Changelog v6.0.0b3 ---------------- * Fix bug when deserializing Union types +* Fix bug when deserializing delete response v6.0.0b2 ---------------- diff --git a/nylas/handler/api_resources.py b/nylas/handler/api_resources.py index 890bb6b4..38e5bd15 100644 --- a/nylas/handler/api_resources.py +++ b/nylas/handler/api_resources.py @@ -69,4 +69,4 @@ def destroy( response_json = self._http_client._execute( "DELETE", path, headers, query_params, request_body ) - return Response.from_dict(response_json, response_type) + return response_type.from_dict(response_json) diff --git a/nylas/models/events.py b/nylas/models/events.py index aacaefe5..736ac625 100644 --- a/nylas/models/events.py +++ b/nylas/models/events.py @@ -316,7 +316,7 @@ class Event: participants: List[Participant] when: When = field(metadata=config(decoder=_decode_when)) conferencing: Optional[Conferencing] = field( - metadata=config(decoder=_decode_conferencing) + default=None, metadata=config(decoder=_decode_conferencing) ) object: str = "event" description: Optional[str] = None