From f0abc2af7f82884942a83a43fdb9175cc5bbc2a6 Mon Sep 17 00:00:00 2001 From: Maxim Kulkin Date: Sun, 27 Nov 2016 00:56:44 -0800 Subject: [PATCH] Fix caching of resolved Object fields --- lollipop/types.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lollipop/types.py b/lollipop/types.py index 5535f19..7d8e1d3 100644 --- a/lollipop/types.py +++ b/lollipop/types.py @@ -1052,10 +1052,10 @@ def __init__(self, bases_or_fields=None, fields=None, constructor=None, @property def fields(self): - if not hasattr(self, '__fields'): - self.__fields = self._resolve_fields(self.bases, self._fields, - self._only, self._exclude) - return self.__fields + if not hasattr(self, '_resolved_fields'): + self._resolved_fields = self._resolve_fields(self.bases, self._fields, + self._only, self._exclude) + return self._resolved_fields default_field_type = inheritable_property('default_field_type') constructor = inheritable_property('constructor')