Return an optional Sone from the current session.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ImageBrowserPage.java
index 60b22d5..969160b 100644 (file)
@@ -102,7 +102,7 @@ public class ImageBrowserPage extends SoneTemplatePage {
                        templateContext.set("albums", albumPagination.getItems());
                        return;
                }
-               Sone sone = getCurrentSone(request.getToadletContext(), false);
+               Sone sone = getCurrentSone(request.getToadletContext(), false).get();
                templateContext.set("soneRequested", true);
                templateContext.set("sone", sone);
        }