Dont iterate over dictionary that we are modifying.

This commit is contained in:
Steve Pulec 2018-04-04 14:56:51 -04:00
parent 4184acc0d2
commit daa6bfe84d

View File

@ -24,7 +24,7 @@ class BaseObject(BaseModel):
def gen_response_object(self): def gen_response_object(self):
response_object = copy(self.__dict__) response_object = copy(self.__dict__)
for key, value in response_object.items(): for key, value in self.__dict__.items():
if '_' in key: if '_' in key:
response_object[self.camelCase(key)] = value response_object[self.camelCase(key)] = value
del response_object[key] del response_object[key]