diff --git a/contact-center/app/src/main/java/com/chatopera/cc/proxy/AgentServiceProxy.java b/contact-center/app/src/main/java/com/chatopera/cc/proxy/AgentServiceProxy.java index 085610b8..8c02175a 100644 --- a/contact-center/app/src/main/java/com/chatopera/cc/proxy/AgentServiceProxy.java +++ b/contact-center/app/src/main/java/com/chatopera/cc/proxy/AgentServiceProxy.java @@ -165,8 +165,8 @@ public class AgentServiceProxy { StatusEvent statusEvent = statusEventRes.findById(agentService.getOwner()); if (statusEvent != null) { if (StringUtils.isNotBlank(statusEvent.getHostid())) { - PbxHost pbxHost = pbxHostRes.findById(statusEvent.getHostid()); - view.addObject("pbxHost", pbxHost); + pbxHostRes.findById(statusEvent.getHostid()) + .ifPresent(it -> view.addObject("pbxHost", it)); } view.addObject("statusEvent", statusEvent); }