Return an optional Sone from the current session.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / EditProfilePage.java
index 39c2561..28de87d 100644 (file)
@@ -61,7 +61,7 @@ public class EditProfilePage extends SoneTemplatePage {
        protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
                super.processTemplate(request, templateContext);
                ToadletContext toadletContenxt = request.getToadletContext();
-               Sone currentSone = getCurrentSone(toadletContenxt);
+               Sone currentSone = getCurrentSone(toadletContenxt).get();
                Profile profile = currentSone.getProfile();
                String firstName = profile.getFirstName();
                String middleName = profile.getMiddleName();