minor bugfix when None value passed to function

This commit is contained in:
Raphael Maenle 2020-06-06 20:01:38 +02:00
parent 183bf60fc0
commit 1a5700e9a0

View File

@ -99,6 +99,8 @@ def calendarCredentials(token = None):
def updateCalendars(user, calendars, colors):
if user == None or calendars == None or colors == None:
return
COLORS_FILE = os.path.join(os.path.dirname(__file__), 'colors.json')
with open(COLORS_FILE) as f:
colormap = json.load(f)