use new attribute_changed method for taxons take 2

This commit is contained in:
Andy Brett
2021-04-08 19:42:05 -07:00
committed by Matt-Yorkley
parent be0eb5f5f9
commit d255ca22f5

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