Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX beta] rollbackAttributes() works after multiple failed saves #3857

Merged
merged 1 commit into from
Oct 15, 2015
Merged

[BUGFIX beta] rollbackAttributes() works after multiple failed saves #3857

merged 1 commit into from
Oct 15, 2015

Conversation

pangratz
Copy link
Member

A rollback of dirty attributes didn't work correctly when a model is
saved more than 1 time and the save fails. The issue is that the exit
handler on the invalid state - which is called when the model is saved
again and it is transitioned into the inFlight state - clears the
_inFlightAttributes which unfortunately wipes all the data needed to
rollback attributes.

The exit handler has been implemented in the course of #1755, but the
reported issue in that PR seems to be fixed ever since elsewhere in the
code base, since the added test back test still is green.


This depends on #3856 #3859 and closes #3677.

@tchak
Copy link
Member

tchak commented Oct 15, 2015

I am 👍 with this one. Will merge it after #3859

@tchak
Copy link
Member

tchak commented Oct 15, 2015

@pangratz can you rebase to make sure tests are ok?

A rollback of dirty attributes didn't work correctly when a model is
saved more than 1 time and the save fails. The issue is that the `exit`
handler on the invalid state - which is called when the model is saved
again and it is transitioned into the inFlight state - clears the
`_inFlightAttributes` which unfortunately wipes all the data needed to
rollback attributes.

The exit handler has been implemented in the course of #1755, but the
reported issue in that PR seems to be fixed ever since elsewhere in the
code base, since the added test back test still is green.
@pangratz
Copy link
Member Author

I ❤️ AppVeyor.

tchak added a commit that referenced this pull request Oct 15, 2015
…rollbackAttribute

[BUGFIX beta] rollbackAttributes() works after multiple failed saves
@tchak tchak merged commit ae5af2e into emberjs:master Oct 15, 2015
@pangratz pangratz deleted the fix-multiple-failed-saves-and-rollbackAttribute branch October 20, 2015 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rollbackAttributes() not working after more than one 422 error
2 participants