-
-
Notifications
You must be signed in to change notification settings - Fork 729
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 error ActiveModel::UnknownAttributeError: unknown attribute 'distributor' for Spree::Product
on setup
#7625
Comments
Aha, I've never seen this before. Yeah it looks like a simple error in that sample data file. We just need to drop the openfoodnetwork/lib/tasks/sample_data/product_factory.rb Lines 23 to 28 in 99cf23d
|
I can confirm removing the Maybe they were a forgotten part of a bigger change, since no one noticed the error they produced in a while. |
Yep! I think part of the issue is that previous versions of Rails used to silently ignore attributes that were not relevant, but after one of the Rails upgrades the behavior changed to throwing a fatal error instead. |
What we should change and why (this is tech debt)
When running
setup/script
the above error pops upContext
https://openfoodnetwork.slack.com/archives/C2GQ45KNU/p1620456501144500?thread_ts=1620397593.134200&cid=C2GQ45KNU
Linked issue: #7613
Impact and timeline
Timeline: 1 week. Impact: better onboarding experience for new developers ✨
The text was updated successfully, but these errors were encountered: