Added nattributes/attributes on ServerSessions as mock non-db-persistent handlers (both pointing to the same NAttributeHandler) in order to better match the API of Objects. Resolves #827.

This commit is contained in:
Griatch 2015-10-18 17:24:17 +02:00
parent 940eb02064
commit 0493dc0b4e
2 changed files with 128 additions and 17 deletions

View file

@ -122,9 +122,7 @@ class DbHolder(object):
if attrname == 'all':
# we allow to overload our default .all
attr = _GA(self, _GA(self, 'name')).get("all")
if attr:
return attr
return _GA(self, "all")
return attr if attr else _GA(self, "all")
return _GA(self, _GA(self, 'name')).get(attrname)
def __setattr__(self, attrname, value):