mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 16:28:50 +01:00
fix #1271. Don't block an already blocked todo. Create tests for this case
This commit is contained in:
parent
4db90386a8
commit
dcb155d90d
6 changed files with 158 additions and 61 deletions
|
|
@ -286,7 +286,7 @@ class TodosController < ApplicationController
|
|||
@original_state = @todo.state
|
||||
unless @predecessor.completed?
|
||||
@todo.add_predecessor(@predecessor)
|
||||
@todo.block!
|
||||
@todo.block! unless @todo.pending?
|
||||
@saved = @todo.save
|
||||
|
||||
@status_message = t('todos.added_dependency', :dependency => @predecessor.description)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue