mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix enterprises spec by adding needed references statement
This commit is contained in:
@@ -72,6 +72,7 @@ module Spree
|
||||
else
|
||||
Spree::User
|
||||
.includes(:enterprises)
|
||||
.references(:enterprises)
|
||||
.where("enterprises.id IN (SELECT enterprise_id FROM enterprise_roles WHERE user_id = ?)",
|
||||
id)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user