-
Notifications
You must be signed in to change notification settings - Fork 30
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
Do not allow OptionValues to be created without an OptionType #68
Comments
👍 it should fail because it doesn't make sense to have an option value without a "parent" option type. Still not sure why we don't have that validation in Solidus... |
We could perhaps add some sort of validation (even on a database level) to OptionValue |
We could, but it's hard to make this kind of things backward-compatible: if you have incorrect data in your database, you upgrade Solidus and run an update on an old, incorrect record (for example updating them in rake task for unrelated reasons), it will fail unexpectedly. One way of solving this is creating a preference (like |
This issue has been automatically marked as stale because it has not had recent activity. It might be closed if no further activity occurs. Thank you for your contributions. |
The
OptionValue
processor can create an OptionValue without an OptionType. This can lead to problems when querying Variants which are associated with it, resulting in 500 on both Solidus API and Admin (and I'm afraid, more concerning, the Frontend).This problem has happened quite a few times on a project I'm working on; unfortunately I haven't been able to reproduce on the sandbox yet.
There's an open pull request on Solidus addressing this problem
--
Maybe we could tweak
solidus_importer/lib/solidus_importer/processors/option_values.rb
Line 23 in c89d279
nil
?The text was updated successfully, but these errors were encountered: