Commit b581472e authored by Aurel's avatar Aurel Committed by Arnaud Fontaine

Record only checks its schema, we need to access specials attribute of brain

parent 31ac7b01
...@@ -41,7 +41,10 @@ class ComputedAttributeGetItemCompatibleMixin(ZSQLBrain): ...@@ -41,7 +41,10 @@ class ComputedAttributeGetItemCompatibleMixin(ZSQLBrain):
# ComputedAttribute compatibility for __getitem__ # ComputedAttribute compatibility for __getitem__
# pylint: disable=E0102 # pylint: disable=E0102
def __getitem__(self, name): def __getitem__(self, name):
item = self.__super__getitem__(name) try:
item = self.__super__getitem__(name)
except KeyError:
item = self.__getattribute__(name)
if isinstance(item, ComputedAttribute): if isinstance(item, ComputedAttribute):
return item.__of__(self) return item.__of__(self)
return item return item
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment