Commit 5a168128 authored by fred's avatar fred
Browse files

add special case to grid for an emission during 12:45-13:00

parent 88838c84
......@@ -333,6 +333,10 @@ class Grid(TemplateView):
'emission__categories').select_related().order_by('datetime'):
row_start = schedule.datetime.hour * 2 + \
int(math.ceil(schedule.datetime.minute / 30))
if schedule.get_duration() < 30:
# special case for an emission during 12:45-13:00
row_start = schedule.datetime.hour * 2 + \
int(math.floor(schedule.datetime.minute / 30))
day_no = schedule.get_weekday()
for step in range(int(math.ceil(schedule.get_duration() / 30.))):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment