Skip to content

Fix(promotions): Validate benefits on save#5981

Merged
tvdeyen merged 2 commits intosolidusio:mainfrom
mamhoff:tiered-percent-fix
Dec 3, 2024
Merged

Fix(promotions): Validate benefits on save#5981
tvdeyen merged 2 commits intosolidusio:mainfrom
mamhoff:tiered-percent-fix

Conversation

@mamhoff
Copy link
Copy Markdown
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
@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
Copy Markdown
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
@github-actions
Copy link
Copy Markdown

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