From d74b126fc02b94873d6ef017ca7f1f3f300cb2ef Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Tue, 24 Sep 2024 09:56:55 +0100 Subject: [PATCH] Revert "Use single where clause" This reverts commit 915f22450b854db248cef2e4d4dc8cc369debfdc. --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 241994bfa..4cc527e0e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -93,7 +93,7 @@ class User < ApplicationRecord if current_user&.support? where(discarded_at: nil) else - where(discarded_at: nil, organisation: current_user.organisation.child_organisations + [current_user.organisation]) + where(discarded_at: nil).where(organisation: current_user.organisation.child_organisations + [current_user.organisation]) end }