Skip to content

Commit

Permalink
Merge pull request #3 from tidepool-org/add-list-users-endpoint
Browse files Browse the repository at this point in the history
Do not try to serialize non-existent users
  • Loading branch information
toddkazakov authored Sep 9, 2020
2 parents 72b857f + b5f1eb8 commit ebc9db9
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 ebc9db9

Please sign in to comment.