Return an optional Sone from the current session.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / DeleteProfileFieldPage.java
index 030279b..d6ba0dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - DeleteProfileFieldPage.java - Copyright © 2011 David Roden
+ * Sone - DeleteProfileFieldPage.java - Copyright © 2011–2013 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
@@ -54,7 +54,7 @@ public class DeleteProfileFieldPage extends SoneTemplatePage {
        @Override
        protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
                super.processTemplate(request, templateContext);
-               Sone currentSone = getCurrentSone(request.getToadletContext());
+               Sone currentSone = getCurrentSone(request.getToadletContext()).get();
                Profile profile = currentSone.getProfile();
 
                /* get parameters from request. */