diff --git a/Routine.py b/Routine.py index de2854c..80bb99c 100644 --- a/Routine.py +++ b/Routine.py @@ -14,7 +14,7 @@ class Routine: def updateCalendar(self, user): # check google: - credentials = user.getGoogleCredentials() + credentials = user.google_token if credentials is None: return @@ -23,6 +23,8 @@ class Routine: for calendar in calendars: if calendar.toggle == 'True': visualCals.append(calendar.calendar_id) + client_token = GC.build_credentials(user.google_token.token, + user.google_token.refresh_token) googleCreds = google.oauth2.credentials.Credentials(**credentials) calendarjson = caltojson.generateJsonFromCalendarEntries(visualCals, googleCreds) user.setJson(calendarjson)