Fix "PG::ProtocolViolation: ERROR: bind message supplies 0 parameters" errors

This commit is contained in:
Matt-Yorkley
2020-11-05 14:01:29 +00:00
parent 31415d00e6
commit 6b3da4ac89

View File

@@ -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|