Skip to content

Commit

Permalink
Do not try to serialize non-existent users
Browse files Browse the repository at this point in the history
  • Loading branch information
toddkazakov committed Sep 9, 2020
1 parent c99d079 commit b5f1eb8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

public class TidepoolAdminResource extends AdminResource {

private final String ID_SEPARATOR = ",";
private static final String ID_SEPARATOR = ",";

private final KeycloakSession session;

Expand All @@ -37,7 +37,9 @@ public Response getUsersById(@QueryParam("ids") String ids) {

for (String id : ids.split(ID_SEPARATOR)) {
UserModel user = provider.getUserById(id, realm);
representations.add(toRepresentation(user, realm));
if (user != null) {
representations.add(toRepresentation(user, realm));
}
}
}

Expand Down

0 comments on commit b5f1eb8

Please sign in to comment.