Skip to content

Commit

Permalink
Implement manual event update
Browse files Browse the repository at this point in the history
  • Loading branch information
PhongT16 committed Nov 14, 2023
1 parent b4c8aa0 commit e246fed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 0 additions & 2 deletions OutlookCalendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ def main(configs):

# Retrieve the group member emails
group_members = utils.get_email_list(configs['group_name'], configs['email_list_update_interval'])
#group_members = ["[email protected]"]


# Get access token
access_token = utils.acquire_access_token(app, configs['scopes'])
Expand Down
8 changes: 7 additions & 1 deletion SimpleEvent.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,19 @@ def create_event_for_shared_calendar(cls, event, net_ids):
temp_net_ids = []
for net_id in net_ids:
temp_net_ids.append(net_id.split("@")[0])


net_ids = temp_net_ids


start = SimpleEvent.make_datetime(event['start']['dateTime'])
subject = event['subject']
event_identifier = subject.split(' ', 1) # (net_id, status)
# event_identifier[1] in valid_subjects

if event_identifier[0] not in net_ids:
# this is for manager manual update
return

if (len(event_identifier) == 2 and (event_identifier[1] == "OUT" or event_identifier[1] == "OUT AM" or event_identifier[1] == "OUT PM")):
simple_event = cls(event_identifier[0], subject, start)
return simple_event
Expand Down

0 comments on commit e246fed

Please sign in to comment.