We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f706095 commit d94139aCopy full SHA for d94139a
modules/swagger-codegen/src/main/resources/python/configuration.mustache
@@ -22,10 +22,16 @@ class TypeWithDefault(type):
22
def __call__(cls):
23
if cls._default is None:
24
cls._default = type.__call__(cls)
25
- return copy.copy(cls._default)
+ return cls._two_level_copy(cls._default)
26
27
def set_default(cls, default):
28
- cls._default = copy.copy(default)
+ cls._default = cls._two_level_copy(default)
29
+
30
+ def _two_level_copy(cls, obj):
31
+ newone = copy.copy(obj)
32
+ for key in obj.__dict__.keys():
33
+ newone.__dict__[key] = copy.copy(obj.__dict__[key])
34
+ return newone
35
36
37
class Configuration(six.with_metaclass(TypeWithDefault, object)):
0 commit comments