Skip to content

Commit

Permalink
Fix unavailable resource gantt chart in Tasks mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tpaviot committed Jan 20, 2021
1 parent 65fd185 commit 04cf1c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions processscheduler/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def render_gantt_matplotlib(self,
# defined a mapping between the tasks and the colors, so that
# each task has the same color on both graphs
task_colors = {}
for i, task_name in enumerate(self.tasks):
for i, task_name in enumerate(tasks_to_render):
task_colors[task_name] = cmap(i)
# the task color is defined from the task name, this way the task has
# already the same color, even if it is defined after
Expand All @@ -168,7 +168,7 @@ def draw_broken_barh_with_text(start, length, bar_color, text, hatch=None):

# in Tasks mode, create one line per task on the y axis
if render_mode == 'Tasks':
for i, task_name in enumerate(self.tasks):
for i, task_name in enumerate(tasks_to_render):
# build the bar text string
task_solution = self.tasks[task_name]
if task_solution.assigned_resources:
Expand Down

0 comments on commit 04cf1c6

Please sign in to comment.