use new attribute_changed method for taxons take 2

This commit is contained in:
Andy Brett
2021-04-08 19:42:05 -07:00
parent bb465b5715
commit 0aad2e0bea

View File

@@ -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