- Post post = webInterface.getCore().getPost(postId, false);
- Sone currentSone = getCurrentSone(request.getToadletContext());
- if ((post == null) || (post.getSone() == null)) {
+ Optional<Post> post = webInterface.getCore().getDatabase().getPost(postId);
+ if (!post.isPresent()) {