mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-11 15:12:37 +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
2210b7a646
commit
a260c746d2
1 changed files with 1 additions and 1 deletions
|
|
@ -90,7 +90,7 @@ class TodosController < ApplicationController
|
||||||
@saved = @todo.save
|
@saved = @todo.save
|
||||||
|
|
||||||
# Fix for #977 because AASM overrides @state on creation
|
# 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
|
@saved = @todo.save
|
||||||
@todo.update_state_from_project if @saved
|
@todo.update_state_from_project if @saved
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue