Skip to content

Commit

Permalink
fix: parent method is a property
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Cederstrand committed Jun 6, 2024
1 parent 6fcaf3a commit 348a8f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exchangelib/folders/roots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 348a8f3

Please sign in to comment.