mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
fix deprecation warning when accessing model errors
This commit is contained in:
@@ -415,8 +415,8 @@ module Spree
|
||||
# If the master cannot be saved, the Product object will get its errors
|
||||
# and will be destroyed
|
||||
rescue ActiveRecord::RecordInvalid
|
||||
master.errors.each do |att, error|
|
||||
errors.add(att, error)
|
||||
master.errors.each do |error|
|
||||
errors.add error.attribute, error.message
|
||||
end
|
||||
raise
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user