mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-09 18:58:51 +01:00
fix regression by last commit
Signed-off-by: Reinier Balt <lrbalt@gmail.com>
This commit is contained in:
parent
f5cabbf74d
commit
8fe5552d64
2 changed files with 8 additions and 8 deletions
|
|
@ -89,7 +89,7 @@ class TodosController < ApplicationController
|
|||
@todo.errors.add(:context, "unknown") if context.nil?
|
||||
end
|
||||
|
||||
if @saved
|
||||
if @todo.errors.empty?
|
||||
@todo.starred= (params[:new_todo_starred]||"").include? "true"
|
||||
|
||||
@todo.add_predecessor_list(predecessor_list)
|
||||
|
|
@ -97,9 +97,11 @@ class TodosController < ApplicationController
|
|||
# Fix for #977 because AASM overrides @state on creation
|
||||
specified_state = @todo.state
|
||||
@saved = @todo.save
|
||||
end
|
||||
|
||||
@todo.update_state_from_project if @saved
|
||||
@todo.update_state_from_project if @saved
|
||||
else
|
||||
@saved = false
|
||||
end
|
||||
|
||||
unless (@saved == false) || tag_list.blank?
|
||||
@todo.tag_with(tag_list)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue