mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
do not save if previous save had validation problems.
this prevents test failures if you use it on a db that has been used after the aasm upgrade (forward compatible)
This commit is contained in:
parent
9f8e55c672
commit
65e3a8ff30
1 changed files with 1 additions and 1 deletions
|
|
@ -90,7 +90,7 @@ class TodosController < ApplicationController
|
|||
@saved = @todo.save
|
||||
|
||||
# Fix for #977 because AASM overrides @state on creation
|
||||
@todo.update_attribute('state', specified_state) unless specified_state == "immediate"
|
||||
@todo.update_attribute('state', specified_state) unless specified_state == "immediate" || specified_state.nil? || !@saved
|
||||
@saved = @todo.save
|
||||
@todo.update_state_from_project if @saved
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue