From d255ca22f53ff289123331b45e38fca8dfe6d253 Mon Sep 17 00:00:00 2001 From: Andy Brett Date: Thu, 8 Apr 2021 19:42:05 -0700 Subject: [PATCH] use new attribute_changed method for taxons take 2 --- app/models/spree/product.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/spree/product.rb b/app/models/spree/product.rb index c1152e1462..a2ae860d9f 100755 --- a/app/models/spree/product.rb +++ b/app/models/spree/product.rb @@ -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