updates database design
This commit is contained in:
parent
26cc3425ee
commit
fe1c216c29
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user