Commit d479bdec authored by fred's avatar fred
Browse files

grid: fix placement of emissions crossing the midnight line

parent b02b226f
......@@ -85,11 +85,9 @@ class Grid(TemplateView):
day_no = schedule.get_weekday()
for step in range(int(math.ceil(schedule.emission.duration / 30))):
if grid[row_start+step][day_no] is None:
print 'creating a time cell at', row_start+step, day_no
grid[row_start+step][day_no] = TimeCell()
if grid[(row_start+step)%nb_lines][day_no] is None:
grid[(row_start+step)%nb_lines][day_no] = TimeCell()
# start grid at 5am
grid = grid[2*5:] + grid[:2*5]
Supports Markdown
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