diff --git a/app/assets/javascripts/admin/bulk_product_update.js.coffee b/app/assets/javascripts/admin/bulk_product_update.js.coffee index 3d13e0423c..734b3d0db0 100644 --- a/app/assets/javascripts/admin/bulk_product_update.js.coffee +++ b/app/assets/javascripts/admin/bulk_product_update.js.coffee @@ -401,6 +401,9 @@ productEditModule.controller "AdminProductEditCtrl", [ delete variant.unit_value_with_description # If we end up live-updating this field, we might want to reinstate its verification here delete variant.options_text + if product.master + delete product.master.unit_value_with_description + delete product.master.options_text products_filtered diff --git a/spec/javascripts/unit/bulk_product_update_spec.js.coffee b/spec/javascripts/unit/bulk_product_update_spec.js.coffee index 769f6cf8c8..90d80dd295 100644 --- a/spec/javascripts/unit/bulk_product_update_spec.js.coffee +++ b/spec/javascripts/unit/bulk_product_update_spec.js.coffee @@ -850,6 +850,15 @@ describe "AdminProductEditCtrl", -> } ] + it "returns master variant without the unit_value_with_description field", -> + scope.products = [{id: 123, master: {id: 234, unit_value_with_description: 'foo'}}] + expect(scope.productsWithoutDerivedAttributes(scope.products)).toEqual [ + { + id: 123 + master: {id: 234} + } + ] + describe "deep copying products", -> it "copies products", ->