Do not query organizations when selecting a user if organization is disabled

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
This commit is contained in:
Pedro Igor 2024-08-16 10:53:55 -03:00
parent e3c0b918bd
commit d0335d23fe

View file

@ -123,7 +123,9 @@ export default function EditUser() {
adminClient.attackDetection.findOne({ id: id! }),
adminClient.users.getUnmanagedAttributes({ id: id! }),
adminClient.users.getProfile({ realm: realmName }),
adminClient.organizations.find({ first: 0, max: 1 }),
showOrganizations
? adminClient.organizations.find({ first: 0, max: 1 })
: [],
]),
([
userData,