Update non-null fields
This commit is contained in:
parent
2922c7b34a
commit
e7424c811c
@ -89,7 +89,15 @@ public class ChatService {
|
||||
.replaceWith(chat);
|
||||
} else {
|
||||
// Update all fields
|
||||
if (chat.name != null) {
|
||||
entity.name = chat.name;
|
||||
}
|
||||
if (chat.username != null) {
|
||||
entity.username = chat.username;
|
||||
}
|
||||
if (chat.status != null) {
|
||||
entity.status = chat.status;
|
||||
}
|
||||
// Return the updated item
|
||||
return Uni.createFrom().item(entity);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user