diff --git a/app/models/enterprise.rb b/app/models/enterprise.rb index 7d64eccac6..4c7aa40bd8 100644 --- a/app/models/enterprise.rb +++ b/app/models/enterprise.rb @@ -132,7 +132,7 @@ class Enterprise < ActiveRecord::Base where(nil) end } - scope :is_primary_producer, -> { where(is_primary_producer: true) } + scope :is_primary_producer, -> { where("enterprises.is_primary_producer IS TRUE") } scope :is_distributor, -> { where('sells != ?', 'none') } scope :is_hub, -> { where(sells: 'any') } scope :supplying_variant_in, lambda { |variants|