Closed suzdalnitski closed 2 years ago
By the way, you should be able to get the Travis CI
status check unstuck by removing the "required status checks" on the master branch, and then adding them back in again:
Ah great catch, this was the same issue in #6. I've added a test and will merge it, thanks for the contribution!
Tagged and release as 0.3.3
, thanks!
Thank you!
This PR fixes an issue that I've inadvertently introduced in my previous PR: https://github.com/edisonywh/gearbox/pull/12
The culprit was this line, which overrode any previous changeset
changes
by applying them:This is a problem whenever using this function with Ecto - this will leave the
changes
empty, and any previous changes made beforeGearbox.Ecto
will not get applied by Ecto when runningRepo.update
.The fix is to only use the struct with applied changes within the
validate_transition
function only.