Skip to content

Commit 6c5de44

Browse files
author
alex.chen
committed
fix the issue of cannot deseralize polymorphic model
1 parent 57907b1 commit 6c5de44

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

samples/client/petstore-security-test/python/petstore_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ def __deserialize_datatime(self, string):
592592
)
593593

594594
def __hasattr(self, object, name):
595-
return name in object.__dict__
595+
return name in object.__class__.__dict__
596596

597597
def __deserialize_model(self, data, klass):
598598
"""Deserializes list or dict to model.

samples/client/petstore/python/petstore_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ def __deserialize_datatime(self, string):
592592
)
593593

594594
def __hasattr(self, object, name):
595-
return name in object.__dict__
595+
return name in object.__class__.__dict__
596596

597597
def __deserialize_model(self, data, klass):
598598
"""Deserializes list or dict to model.

0 commit comments

Comments
 (0)