X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FViewPostPage.java;h=9ab6612128eba2b63ed0593dba853e1d4287267e;hb=76ed638264e531a26e35647d13702db865a52321;hp=50719ee36069fc02d1d50aa94ee319b6331f413b;hpb=3c04419570520b0c7158dbb8c27083d419afdf47;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/ViewPostPage.java b/src/main/java/net/pterodactylus/sone/web/ViewPostPage.java index 50719ee..9ab6612 100644 --- a/src/main/java/net/pterodactylus/sone/web/ViewPostPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ViewPostPage.java @@ -1,5 +1,5 @@ /* - * Sone - ViewPostPage.java - Copyright © 2010–2013 David Roden + * Sone - ViewPostPage.java - Copyright © 2010–2015 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -75,7 +75,7 @@ public class ViewPostPage extends SoneTemplatePage { String postId = request.getHttpRequest().getParam("post"); boolean raw = request.getHttpRequest().getParam("raw").equals("true"); Optional post = webInterface.getCore().getPost(postId); - templateContext.set("post", post.get()); + templateContext.set("post", post.orNull()); templateContext.set("raw", raw); }