Skip to content

Commit

Permalink
Fixes potential NPE in results iteration
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Grote <cmgrote@users.noreply.github.com>
  • Loading branch information
cmgrote committed Dec 4, 2024
1 parent f3574a7 commit 8a4db2d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class Users(
.column("profileRoleOther")
.build()
ctx.client.users.list(request).forEach { user ->
val personas = user.personas?.joinToString("\n") { it.displayName } ?: ""
val groups = ctx.client.users.listGroups(user.id)?.records?.joinToString("\n") { it.name } ?: ""
val personas = user.personas?.joinToString("\n") { it.displayName ?: "" } ?: ""
val groups = ctx.client.users.listGroups(user.id)?.records?.joinToString("\n") { it.name ?: "" } ?: ""
val designation =
if (user.attributes?.profileRole?.get(0) == "Other") {
user.attributes?.profileRoleOther?.get(0)
Expand Down

0 comments on commit 8a4db2d

Please sign in to comment.