Skip to content

Commit

Permalink
[Fix] Fix NPE when adding new institution to user
Browse files Browse the repository at this point in the history
  • Loading branch information
blcham committed Dec 14, 2023
1 parent df0d346 commit 001b6d0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private boolean equals(HasUri entity1, HasUri entity2){
* @return the URI of the entity or null if entity is null.
*/
private URI getURI(HasUri entity){
return Optional.of(entity).map(HasUri::getUri).orElse(null);
return Optional.ofNullable(entity).map(HasUri::getUri).orElse(null);
}

private List<User> getByInstitution(String institutionKey) {
Expand Down

0 comments on commit 001b6d0

Please sign in to comment.