mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-19 23:46:10 +01:00
do not activate already completed todos, fix #1778
This commit is contained in:
parent
5718eac5c3
commit
cfdafc69e3
2 changed files with 19 additions and 1 deletions
|
|
@ -317,7 +317,7 @@ class Todo < ActiveRecord::Base
|
|||
|
||||
# activate todos that should be activated if the current todo is completed
|
||||
def activate_pending_todos
|
||||
pending_todos = successors.select {|t| t.uncompleted_predecessors.empty?}
|
||||
pending_todos = successors.select { |t| t.uncompleted_predecessors.empty? and !t.completed? }
|
||||
pending_todos.each {|t| t.activate! }
|
||||
return pending_todos
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue