Commit a2f8e160 authored by Aurel's avatar Aurel Committed by Kazuhiko Shiozaki

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

parent 373136f2
...@@ -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