mirror of
https://github.com/SqrtMinusOne/org-clock-agg.git
synced 2025-12-10 14:03:02 +03:00
org-clock-agg: fix divide by zero
This commit is contained in:
parent
e8642c02b0
commit
89d93bd486
1 changed files with 6 additions and 2 deletions
|
|
@ -717,9 +717,13 @@ TOTAL-TIME and PARENT-TIME are recursive parameters."
|
|||
(dolist (node tree)
|
||||
(let ((total (float (alist-get :total (cdr node)))))
|
||||
(setf (alist-get :parent-share (cdr node))
|
||||
(/ total (float parent-time))
|
||||
(if (> 0 parent-time)
|
||||
(/ total (float parent-time))
|
||||
0)
|
||||
(alist-get :total-share (cdr node))
|
||||
(/ total (float total-time)))
|
||||
(if (> 0 total-time)
|
||||
(/ total (float total-time))
|
||||
0))
|
||||
(org-clock-agg--groupby-postaggregate
|
||||
(alist-get :children (cdr node))
|
||||
total-time
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue