Fix line item option condition params #6233
Draft
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.
Summary
This fixes a bug being unable to create a line_item_option_value condition. Adding a line_item_option_value as a condition to a benefit will raise a TypeError due to the form submitting an array when a hash is expected.
Currently, the product-picker allows for selecting multiple products when only one product should be selected per entry. The selected product id is not passed to the option-value-picker resulting in the params being malformed and the conditions_controller raising a 500 on create.
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: