Fixed a minor typo in docstring for ObjectDB.__db_get: To view all Attributes one uses obj.db.all, not obj.db.all().

This commit is contained in:
Griatch 2012-06-20 23:22:26 +02:00
parent 44bf35cd81
commit 7dcfdc4d4b

View file

@ -1458,7 +1458,7 @@ class TypedObject(SharedMemoryModel):
and
del obj.db.attrname
and
all_attr = obj.db.all() (if there is no attribute named 'all', in which
all_attr = obj.db.all (unless there is no attribute named 'all', in which
case that will be returned instead).
"""
try:
@ -1470,8 +1470,7 @@ class TypedObject(SharedMemoryModel):
_SA(self, 'obj', obj)
def __getattribute__(self, attrname):
if attrname == 'all':
# we allow for overwriting the all() method
# with an attribute named 'all'.
# we allow to overload our default .all
attr = _GA(self, 'obj').get_attribute("all")
if attr:
return attr