From dda69e58dfaebd3389ee5d498503552daba55b4a Mon Sep 17 00:00:00 2001 From: boyska Date: Sun, 7 May 2017 01:42:55 +0200 Subject: [PATCH] FIX explicitly set minimum possible duration --- plugins/talks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/talks.py b/plugins/talks.py index 917dc3b..f1d2bfe 100644 --- a/plugins/talks.py +++ b/plugins/talks.py @@ -100,6 +100,10 @@ def get_talk_data(talkname): .format(talkname)) data['duration'] = 50 data['duration'] = int(data['duration']) + if data['duration'] < GRID_STEP: + logging.info("Talk <{}> lasts only {} minutes; changing to {}" + .format(talkname, data['duration'], GRID_STEP)) + data['duration'] = GRID_STEP if 'room' not in data: logging.warn("Talk <{}> has no `room` field".format(talkname)) if 'time' not in data or 'day' not in data: