Browse Source

Use single where clause

pull/2646/head
Manny Dinssa 2 years ago
parent
commit
915f22450b
  1. 2
      app/models/user.rb

2
app/models/user.rb

@ -93,7 +93,7 @@ class User < ApplicationRecord
if current_user&.support? if current_user&.support?
where(discarded_at: nil) where(discarded_at: nil)
else 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 end
} }

Loading…
Cancel
Save