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

Fix(promotions): Validate benefits on save #5981

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Dec 3, 2024

On Slack, we got a report that the tiered percent calculator wasn't converting its tiers to BigDecimal when being first created. Since this conversion happens before_validation, we should not turn validation off in this controller.

Specs still run through, and I smoke-tested this change locally.

On Slack, we got a report that the tiered percent calculator wasn't
converting its tiers to BigDecimal when being first created. Since this
conversion happens `before_validation`, we should not turn validation
off in this controller.

Specs still run through.
@mamhoff mamhoff requested a review from a team as a code owner December 3, 2024 11:24
@github-actions github-actions bot added the changelog:solidus_promotions Changes to the solidus_promotions gem label Dec 3, 2024
These should help Turbo interpret what's going on.
@mamhoff mamhoff force-pushed the tiered-percent-fix branch from 37dd726 to d98ec79 Compare December 3, 2024 16:39
@tvdeyen tvdeyen enabled auto-merge December 3, 2024 16:39
@tvdeyen tvdeyen merged commit f7a1391 into solidusio:main Dec 3, 2024
11 of 14 checks passed
@tvdeyen tvdeyen added the backport-v4.4 Backport this pull-request to v4.4 label Dec 3, 2024
mamhoff added a commit to mamhoff/solidus that referenced this pull request Dec 4, 2024
In solidusio#5981, we accidentally set this error render to a response code 422.
mamhoff added a commit to mamhoff/solidus that referenced this pull request Dec 4, 2024
In solidusio#5981, we accidentally set this render to a response code 422.
Since it's really the initial render of the form, it should stay a 200.
@tvdeyen
Copy link
Member

tvdeyen commented Dec 6, 2024

Backport after #6016

@tvdeyen tvdeyen added backport-v4.4 Backport this pull-request to v4.4 and removed backport-v4.4 Backport this pull-request to v4.4 labels Dec 6, 2024
Copy link

github-actions bot commented Dec 6, 2024

💚 All backports created successfully

Status Branch Result
v4.4

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v4.4 Backport this pull-request to v4.4 changelog:solidus_promotions Changes to the solidus_promotions gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants