diff --git a/Routine.py b/Routine.py index 9ae1cfc..a5ec40f 100644 --- a/Routine.py +++ b/Routine.py @@ -24,9 +24,8 @@ class Routine: calendars = db.session.query(Calendar).filter(Calendar.usr_id==user.id).all() for calendar in calendars: if calendar.toggle == 'True': - visualCals.append(calendar.name) + visualCals.append(calendar.calendar_id) googleCreds = google.oauth2.credentials.Credentials(**credentials) - print(credentials_to_dict(googleCreds), flush=True) calendarjson = caltojson.generateJsonFromCalendarEntries(visualCals, googleCreds) user.setJson(calendarjson) directory = 'userinfo/' + user.id + '/' diff --git a/caltojson.py b/caltojson.py index e604a5d..4fac74b 100644 --- a/caltojson.py +++ b/caltojson.py @@ -118,7 +118,7 @@ def getCalendars(service): def purgeCalendars(calendars, visibleCalendars): purged = [] for calendar in calendars: - if calendar.summary in visibleCalendars: + if calendar.calendarId in visibleCalendars: purged.append(calendar) return purged @@ -191,8 +191,6 @@ def forEventGetColor(event, colormap, colors): else: calColorId = toCalendarColorId(colormap, event.eventColorId) bg = colors['calendar'][calColorId]['background'] - print(event.name) - print(bg) return toNaturalColor(colormap, bg) def toJson(events): diff --git a/colors.json b/colors.json index ac2bd03..f4c3c9f 100644 --- a/colors.json +++ b/colors.json @@ -90,7 +90,7 @@ }, { "api": "#cd74e6", - "natural": "#8E24AA" + "natural": "#ff00cc" }, { "api": "#a47ae2",