-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[v2.8] Backport for some required bugfixes #3194
Merged
kennyadsl
merged 4 commits into
solidusio:v2.8
from
nebulab:kennyadsl/fix-stock-backordered-v2.8
Jun 11, 2019
Merged
[v2.8] Backport for some required bugfixes #3194
kennyadsl
merged 4 commits into
solidusio:v2.8
from
nebulab:kennyadsl/fix-stock-backordered-v2.8
Jun 11, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The form controls to submit the stock item form was not displayed if only the backorder checkbox changed.
According to the `sassc` compiler, all CSS functions should ensure that they do not end without a `@return` statement. The `very-light` function has the possibility that it could exit without calling such a statement, so we add a catchall `@return` at the end to return the unmodified color value.
We already had this but with the last version of discard the validation is no more performing. I think it's something related to this commit jhawthorn/discard@dfdd984 which is included in the last release. Before the release, calling discarded? on the line: validate :validate_no_amount_used, if: :discarded? was returning true, even if the record change wasn't yet persisted. We don't need that line anymore since now records can't be discarded without passing the after_discard validation so we should not have any of those. Anyway, even if that happens we don't want to block other updates on those records.
This is needed to avoid discard to set deleted_at anyway. Now that we are not running this method as a validation anymore we need to stop the callback chain by throwing abort, see: https://api.rubyonrails.org/classes/ActiveModel/Callbacks.html
ericsaupe
approved these changes
Jun 11, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
jacobherrington
approved these changes
Jun 11, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a backport into v2.8 of:
A new 2.8.x patch version will be released after we merge this.