Skip to content

Commit

Permalink
Fixing up an error where the result can be a tuple (#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
sylviamclaughlin authored Jun 27, 2024
1 parent b929f6b commit 1f22016
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/integrations/google_workspace/google_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ def insert_event(start, end, emails, title, incident_document, **kwargs):
supportsAttachments=True,
conferenceDataVersion=1,
)
return result.get("htmlLink")
# Handle the instance differently if the result is a dictionary or a tuple
if isinstance(result, dict):
htmllink = result.get("htmlLink")
elif isinstance(result, tuple):
htmllink = result[0].get("htmlLink")
return htmllink


# Function to use the freebusy response to find the first available spot in the next 60 days. We look for a 30 minute windows, 3
Expand Down

0 comments on commit 1f22016

Please sign in to comment.