Fix _serializer pickle bugs

This commit is contained in:
Cristi Vijdea
2019-03-03 17:23:04 +02:00
parent e108ddbb48
commit 62d97a80bc
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -167,7 +167,8 @@ class SwaggerDict(OrderedDict):
def __reduce__(self):
# for pickle supprt; this skips calls to all SwaggerDict __init__ methods and relies
# on the already set attributes instead
return _bare_SwaggerDict, (type(self),), vars(self), None, iter(self.items())
attrs = {k: v for k ,v in vars(self).items() if not k.startswith('_NP_')}
return _bare_SwaggerDict, (type(self),), attrs, None, iter(self.items())
class Contact(SwaggerDict):