From d17e503c416566cc81a5706f09013e79baeeb552 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Fri, 19 Oct 2018 16:01:12 +0100 Subject: [PATCH] Fix bug in inventory management page where permissions to change existing variant overrides of deleted products are checked. This commit simply make the inventory page ignore variant overrides of deleted products --- app/controllers/admin/variant_overrides_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/admin/variant_overrides_controller.rb b/app/controllers/admin/variant_overrides_controller.rb index 4a49f53c7c28..06dc152aa9fb 100644 --- a/app/controllers/admin/variant_overrides_controller.rb +++ b/app/controllers/admin/variant_overrides_controller.rb @@ -79,6 +79,7 @@ def load_collection def collection @variant_overrides = VariantOverride.for_hubs(params[:hub_id] || @hubs) + .includes(:variant).where(spree_variants: { deleted_at: nil }) end def collection_actions