backend now uses calendar_id and this is the frontend upgrade
- calendar_id is unique and therefore creates less problems - changing id of DOM from item.name to calendar_id
This commit is contained in:
@ -94,21 +94,22 @@ def get_google_provider_cfg():
|
||||
return requests.get(GOOGLE_DISCOVERY_URL).json()
|
||||
|
||||
class Calendar:
|
||||
def __init__(self, name, toggle='False', color="#000000"):
|
||||
def __init__(self, name, calendarId, toggle='False', color="#000000"):
|
||||
self.name = name
|
||||
self.color = color
|
||||
self.toggle=toggle
|
||||
self.calendarId = calendarId
|
||||
|
||||
def calendarsFromDb():
|
||||
calendars = dbCalendar.getCalendars(dbCalendar, current_user.id)
|
||||
pyCalendars = []
|
||||
for calendar in calendars:
|
||||
name = calendar.name
|
||||
# calId = calendar.calendar_id
|
||||
calendarId = calendar.calendar_id
|
||||
toggle = calendar.toggle
|
||||
color = calendar.color
|
||||
|
||||
pyCalendars.append(Calendar(name, toggle, color))
|
||||
pyCalendars.append(Calendar(name, calendarId, toggle, color))
|
||||
|
||||
return pyCalendars
|
||||
|
||||
|
Reference in New Issue
Block a user