Skip to content

Commit

Permalink
Merge pull request #2 from toksvaeth/no-recipients
Browse files Browse the repository at this point in the history
No recipients
  • Loading branch information
sthulb authored May 18, 2021
2 parents 247a22b + bc91495 commit c41c984
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion calrules/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ def hydrate(self, item: BaseMeetingItem):

self.subject = item.subject
self.sender = item.sender.email_address
to_recipients = item.to_recipients if item.cc_recipients is None else item.to_recipients + item.cc_recipients
if item.to_recipients is None and item.cc_recipients is None:
to_recipients = []
elif item.cc_recipients is None:
to_recipients = item.to_recipients
elif item.to_recipients is None:
to_recipients = item.cc_recipients
else:
to_recipients = item.to_recipients + item.cc_recipients
self.recipients = [to.email_address for to in to_recipients]

if isinstance(item, MeetingRequest) and item.conflicting_meeting_count > 0:
Expand Down

0 comments on commit c41c984

Please sign in to comment.