mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
present? calls length which is breaking it with error ActiveModel::MissingAttributeError Exception: missing attribute: address_id
any? works well as it just verifies the size of the collection
This commit is contained in:
@@ -118,7 +118,7 @@ class Enterprise < ActiveRecord::Base
|
||||
except(:select).
|
||||
select('DISTINCT enterprises.id')
|
||||
|
||||
if ready_enterprises.present?
|
||||
if ready_enterprises.any?
|
||||
where("enterprises.id NOT IN (?)", ready_enterprises)
|
||||
else
|
||||
where(nil)
|
||||
|
||||
Reference in New Issue
Block a user