mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-14 08:26:16 +01:00
Fixed another edge case that Luis caught
Thanks for testing!
This commit is contained in:
parent
c4ef04af4d
commit
9fa5ead8de
2 changed files with 10 additions and 0 deletions
|
|
@ -368,10 +368,12 @@ class TodosController < ApplicationController
|
|||
|
||||
# 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!
|
||||
@pending_to_activate << successor
|
||||
activated_successor_count += 1
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue