diff --git a/plugins/talks.py b/plugins/talks.py index 0efe43f..f358f5c 100644 --- a/plugins/talks.py +++ b/plugins/talks.py @@ -128,6 +128,10 @@ def get_talk_data(talkname): logging.warn("Talk <{}> has no `room` field".format(talkname)) if 'time' not in data or 'day' not in data: logging.warn("Talk <{}> has no `time` or `day`".format(talkname)) + if 'time' in data: + del data['time'] + if 'day' in data: + del data['day'] if 'day' in data: data['day'] = get_global_data()['startdate'] + datetime.timedelta(days=data['day']) if 'time' in data and 'day' in data: @@ -266,7 +270,7 @@ def talks_to_ics(): def talk_to_ics(talk): - if 'time' not in talk: + if 'time' not in talk or 'duration' not in talk: return '' start = talk['time'] end = start + datetime.timedelta(minutes=talk['duration'])