From 8dc94f84c0340d9f3e7c3b3faa17a23c17bfd26f Mon Sep 17 00:00:00 2001 From: Filip Izydorczyk Date: Fri, 18 Dec 2020 17:43:03 +0100 Subject: [PATCH] user response fix --- .../java/com/plannaplan/responses/models/UserResponse.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/restservice/src/main/java/com/plannaplan/responses/models/UserResponse.java b/restservice/src/main/java/com/plannaplan/responses/models/UserResponse.java index 166718c..ac606ac 100755 --- a/restservice/src/main/java/com/plannaplan/responses/models/UserResponse.java +++ b/restservice/src/main/java/com/plannaplan/responses/models/UserResponse.java @@ -14,8 +14,8 @@ public class UserResponse { public UserResponse(User user) { this.id = user.getId(); - this.name = user.getName(); - this.surname = user.getSurname(); + this.name = user.getName() != null ? user.getName() : ""; + this.surname = user.getSurname() != null ? user.getSurname() : ""; this.email = user.getEmail(); }