Skip to content

Commit

Permalink
Fix Attachment __slots__ after 82f5089
Browse files Browse the repository at this point in the history
  • Loading branch information
ecederstrand committed May 4, 2019
1 parent f93c260 commit b832468
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exchangelib/attachments.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Attachment(EWSElement):
BooleanField('is_inline', field_uri='IsInline'),
]

__slots__ = tuple(f.name for f in FIELDS)
__slots__ = tuple(f.name for f in FIELDS) + ('parent_item',)

def __init__(self, **kwargs):
self.parent_item = kwargs.pop('parent_item', None)
Expand Down Expand Up @@ -129,7 +129,7 @@ class FileAttachment(Attachment):
Base64Field('_content', field_uri='Content'),
]

__slots__ = tuple(f.name for f in FIELDS) + ('_fp',)
__slots__ = tuple(f.name for f in FIELDS) + ('parent_item', '_fp')

def __init__(self, **kwargs):
kwargs['_content'] = kwargs.pop('content', None)
Expand Down Expand Up @@ -204,7 +204,7 @@ class ItemAttachment(Attachment):
ItemField('_item', field_uri='Item'),
]

__slots__ = tuple(f.name for f in FIELDS)
__slots__ = tuple(f.name for f in FIELDS) + ('parent_item',)

def __init__(self, **kwargs):
kwargs['_item'] = kwargs.pop('item', None)
Expand Down

0 comments on commit b832468

Please sign in to comment.