1
0
Fork 0

FIX explicitly set minimum possible duration

This commit is contained in:
boyska 2017-05-07 01:42:55 +02:00 committed by dbz
parent 043c9d2499
commit ee8837fbb1

View file

@ -100,6 +100,10 @@ def get_talk_data(talkname):
.format(talkname)) .format(talkname))
data['duration'] = 50 data['duration'] = 50
data['duration'] = int(data['duration']) 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: if 'room' not in data:
logging.warn("Talk <{}> has no `room` field".format(talkname)) logging.warn("Talk <{}> has no `room` field".format(talkname))
if 'time' not in data or 'day' not in data: if 'time' not in data or 'day' not in data: