Skip to content

Commit

Permalink
Avoid NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmalloy committed Sep 29, 2022
1 parent 4cbc69e commit b14320b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/jasper/service/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void delete(String tag) {
public RolesDto whoAmI() {
return RolesDto
.builder()
.tag(auth.getUserTag().toString())
.tag(auth.getUserTag() == null ? null : auth.getUserTag().toString())
.admin(auth.hasRole(ADMIN))
.mod(auth.hasRole(MOD))
.editor(auth.hasRole(EDITOR))
Expand Down

0 comments on commit b14320b

Please sign in to comment.