lib/taskjuggler/reports/GanttTaskBar.rb in taskjuggler-0.0.11 vs lib/taskjuggler/reports/GanttTaskBar.rb in taskjuggler-0.1.0
- old
+ new
@@ -89,10 +89,11 @@
2 * @@size - 2, 'taskbar')
# And then the progress bar. If query is null we assume 50% completion.
if @query
@query.attributeId = 'complete'
@query.process
- completion = @query.result / 100.0
+ res = @query.result
+ completion = res ? res / 100.0 : 0.0
else
completion = 0.5
end
html << rectToHTML(xStart + 1, yCenter - @@size / 2,
(width - 2) * completion, @@size, 'progressbar')