Fix undefined object in Python model __copy__ template (#11792)

* Fix new_cls in methods_shared copy template

* Add generated files
This commit is contained in:
tuanchien 2022-03-19 17:34:06 +13:00 committed by GitHub
parent 0295839a20
commit 1fe2eb6b7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -19,7 +19,7 @@
if self.get("_spec_property_naming", False): if self.get("_spec_property_naming", False):
return cls._new_from_openapi_data(**self.__dict__) return cls._new_from_openapi_data(**self.__dict__)
else: else:
return new_cls.__new__(cls, **self.__dict__) return cls.__new__(cls, **self.__dict__)
def __deepcopy__(self, memo): def __deepcopy__(self, memo):
cls = self.__class__ cls = self.__class__

View File

@ -193,7 +193,7 @@ class OpenApiModel(object):
if self.get("_spec_property_naming", False): if self.get("_spec_property_naming", False):
return cls._new_from_openapi_data(**self.__dict__) return cls._new_from_openapi_data(**self.__dict__)
else: else:
return new_cls.__new__(cls, **self.__dict__) return cls.__new__(cls, **self.__dict__)
def __deepcopy__(self, memo): def __deepcopy__(self, memo):
cls = self.__class__ cls = self.__class__

View File

@ -193,7 +193,7 @@ class OpenApiModel(object):
if self.get("_spec_property_naming", False): if self.get("_spec_property_naming", False):
return cls._new_from_openapi_data(**self.__dict__) return cls._new_from_openapi_data(**self.__dict__)
else: else:
return new_cls.__new__(cls, **self.__dict__) return cls.__new__(cls, **self.__dict__)
def __deepcopy__(self, memo): def __deepcopy__(self, memo):
cls = self.__class__ cls = self.__class__

View File

@ -193,7 +193,7 @@ class OpenApiModel(object):
if self.get("_spec_property_naming", False): if self.get("_spec_property_naming", False):
return cls._new_from_openapi_data(**self.__dict__) return cls._new_from_openapi_data(**self.__dict__)
else: else:
return new_cls.__new__(cls, **self.__dict__) return cls.__new__(cls, **self.__dict__)
def __deepcopy__(self, memo): def __deepcopy__(self, memo):
cls = self.__class__ cls = self.__class__

View File

@ -193,7 +193,7 @@ class OpenApiModel(object):
if self.get("_spec_property_naming", False): if self.get("_spec_property_naming", False):
return cls._new_from_openapi_data(**self.__dict__) return cls._new_from_openapi_data(**self.__dict__)
else: else:
return new_cls.__new__(cls, **self.__dict__) return cls.__new__(cls, **self.__dict__)
def __deepcopy__(self, memo): def __deepcopy__(self, memo):
cls = self.__class__ cls = self.__class__

View File

@ -193,7 +193,7 @@ class OpenApiModel(object):
if self.get("_spec_property_naming", False): if self.get("_spec_property_naming", False):
return cls._new_from_openapi_data(**self.__dict__) return cls._new_from_openapi_data(**self.__dict__)
else: else:
return new_cls.__new__(cls, **self.__dict__) return cls.__new__(cls, **self.__dict__)
def __deepcopy__(self, memo): def __deepcopy__(self, memo):
cls = self.__class__ cls = self.__class__