From 915f22450b854db248cef2e4d4dc8cc369debfdc Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:42:04 +0100 Subject: [PATCH] Use single where clause --- 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 4cc527e0e..241994bfa 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).where(organisation: current_user.organisation.child_organisations + [current_user.organisation]) + where(discarded_at: nil, organisation: current_user.organisation.child_organisations + [current_user.organisation]) end }