diff --git a/CHANGES.rst b/CHANGES.rst index 61ffd97..a3990b3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,12 +3,19 @@ Changelog For changes before version 3.0, see ``HISTORY.rst``. -4.2 (unreleased) +4.3 (unreleased) ---------------- - Nothing changed yet. +4.2 (2019-11-22) +---------------- + +- add a check if object is present ```if not db`` + (`#91 `_). + + 4.1 (2019-09-02) ---------------- diff --git a/src/AccessControl/owner.py b/src/AccessControl/owner.py index ea18fe6..e3d33bc 100644 --- a/src/AccessControl/owner.py +++ b/src/AccessControl/owner.py @@ -264,6 +264,8 @@ def ownerInfo(user, getattr=getattr): if uid is None: return uid db = aq_parent(aq_inner(user)) + if not db: + return None path = [absattr(db.id)] root = db.getPhysicalRoot() while 1: