diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index b76318b28f..a5d7fd2008 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -379,15 +379,6 @@ Layout/ExtraSpacing: - 'spec/spec_helper.rb' - 'spec/support/request/web_helper.rb' -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses -Layout/FirstParameterIndentation: - Exclude: - - 'lib/open_food_network/permissions.rb' - - 'spec/serializers/variant_serializer_spec.rb' - # Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: SupportedStyles, IndentationWidth. diff --git a/lib/open_food_network/permissions.rb b/lib/open_food_network/permissions.rb index b745ebb1f4..c4f347a4fb 100644 --- a/lib/open_food_network/permissions.rb +++ b/lib/open_food_network/permissions.rb @@ -69,7 +69,7 @@ module OpenFoodNetwork granted_distributors = related_enterprises_granted(:add_to_order_cycle, by: managed_enterprises.is_primary_producer) produced = Spree::Order.with_line_items_variants_and_products_outer. where( - "spree_orders.distributor_id IN (?) AND spree_products.supplier_id IN (?)", + "spree_orders.distributor_id IN (?) AND spree_products.supplier_id IN (?)", granted_distributors, related_enterprises_granting(:add_to_order_cycle, to: granted_distributors).merge(managed_enterprises.is_primary_producer) ).pluck(:id) diff --git a/spec/serializers/variant_serializer_spec.rb b/spec/serializers/variant_serializer_spec.rb index 02f5b26e8b..3c6aebf6a9 100644 --- a/spec/serializers/variant_serializer_spec.rb +++ b/spec/serializers/variant_serializer_spec.rb @@ -7,7 +7,7 @@ describe Api::VariantSerializer do it "includes the expected attributes" do expect(subject.attributes.keys). to include( - :id, + :id, :name_to_display, :is_master, :count_on_hand,