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 OptionValueNamer to handle weird scenario #12941

Closed

Conversation

rioug
Copy link
Collaborator

@rioug rioug commented Oct 23, 2024

What? Why?

On some production server, Spree::Variant.new return a variant with only unit_vallue set to 1.0. This fix the unexpected scenario.

Affected servers so far :

  • de_prod
  • us_prod
  • hu_prod

What should we test?

  • Visit ... page.

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

The title of the pull request will be included in the release notes.

Dependencies

Documentation updates

On some production server, Spree::Variant.new return a variant with
only unit_vallue set to 1.0. This fix the unexpected scenario.
@rioug rioug requested a review from dacook October 23, 2024 11:04
@sigmundpetersen sigmundpetersen added the bug-s1 The bug is stopping the platform from working, and there is no workaround. Impact of lot of users. label Oct 23, 2024
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what all the contexts are that this is used.
Also not sure when it can be nil

I'm thinking it might cause other problems by also clearing the value. We know that we don't cover this scenario in any other specs so can't say if it will or not.

So I think this approach might be safer, what do you think?https://github.com/openfoodfoundation/openfoodnetwork/pull/12940/files?w=1

@dacook dacook mentioned this pull request Oct 23, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s1 The bug is stopping the platform from working, and there is no workaround. Impact of lot of users.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

ActionView::Template::Error in admin/products_v3#index
3 participants