From fe1c216c292b1e9c680e2be33103a9439cba5e03 Mon Sep 17 00:00:00 2001 From: Raphael Maenle Date: Wed, 27 May 2020 20:05:25 +0200 Subject: [PATCH] updates database design --- Routine.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)