File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
modules/swagger-codegen/src/main/resources/python Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -597,6 +597,9 @@ class ApiClient(object):
597
597
)
598
598
)
599
599
600
+ def __hasattr(self, object, name):
601
+ return name in object.__dict__
602
+
600
603
def __deserialize_model(self, data, klass):
601
604
"""Deserializes list or dict to model.
602
605
@@ -605,7 +608,7 @@ class ApiClient(object):
605
608
:return: model object.
606
609
"""
607
610
608
- if not klass.swagger_types and not hasattr (klass,
611
+ if not klass.swagger_types and not self.__hasattr (klass,
609
612
'get_real_child_model'):
610
613
return data
611
614
@@ -626,7 +629,7 @@ class ApiClient(object):
626
629
for key, value in data.items():
627
630
if key not in klass.swagger_types:
628
631
instance[key] = value
629
- if hasattr (instance, 'get_real_child_model'):
632
+ if self.__hasattr (instance, 'get_real_child_model'):
630
633
klass_name = instance.get_real_child_model(data)
631
634
if klass_name:
632
635
instance = self.__deserialize(data, klass_name)
You can’t perform that action at this time.
0 commit comments