From 348a8f32120c2fd832df3ac3438b6255492542b3 Mon Sep 17 00:00:00 2001 From: Erik Cederstrand Date: Thu, 6 Jun 2024 11:22:18 +0200 Subject: [PATCH] fix: parent method is a property --- exchangelib/folders/roots.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exchangelib/folders/roots.py b/exchangelib/folders/roots.py index 7c3a771f..b212da57 100644 --- a/exchangelib/folders/roots.py +++ b/exchangelib/folders/roots.py @@ -332,11 +332,12 @@ def __init__(self, **kwargs): if self._distinguished_id: self._distinguished_id.mailbox = None # See DistinguishedFolderId.clean() + @property def _folders_map(self): # Top-level public folders may point to the root folder of the owning account and not the public folders root # of this account. This breaks the assumption of get_children(). Fix it by overwriting the parent folder. fix_parents = self._subfolders is None - res = super()._folders_map() + res = super()._folders_map if fix_parents: with self._subfolders_lock: for f in res.values():