mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
parent
9089e15788
commit
e0143cf435
3 changed files with 23 additions and 4 deletions
|
@ -494,13 +494,10 @@ class TodosController < ApplicationController
|
|||
@uncompleted_predecessors << predecessor
|
||||
end
|
||||
|
||||
# activate successors if they only depend on this todo
|
||||
activated_successor_count = 0
|
||||
@pending_to_activate = []
|
||||
@todo.pending_successors.each do |successor|
|
||||
successor.uncompleted_predecessors.delete(@todo)
|
||||
if successor.uncompleted_predecessors.empty?
|
||||
successor.activate!
|
||||
if successor.uncompleted_predecessors.size == 1
|
||||
@pending_to_activate << successor
|
||||
activated_successor_count += 1
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue