mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
use new attribute_changed method for taxons take 2
This commit is contained in:
@@ -449,9 +449,9 @@ module Spree
|
||||
end
|
||||
|
||||
def remove_previous_primary_taxon_from_taxons
|
||||
return unless saved_change_to_primary_taxon_id? && primary_taxon_id_was
|
||||
return unless saved_change_to_primary_taxon_id? && primary_taxon_id_before_last_save
|
||||
|
||||
taxons.destroy(primary_taxon_id_was)
|
||||
taxons.destroy(primary_taxon_id_before_last_save)
|
||||
end
|
||||
|
||||
def ensure_standard_variant
|
||||
|
||||
Reference in New Issue
Block a user