Remove unnecessary code
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 24 Nov 2016 19:42:28 +0000 (20:42 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 24 Nov 2016 19:42:28 +0000 (20:42 +0100)
src/main/java/net/pterodactylus/sone/web/DeleteProfileFieldPage.java

index a137b82..ffab3b7 100644 (file)
@@ -66,11 +66,6 @@ public class DeleteProfileFieldPage extends SoneTemplatePage {
                /* process POST request. */
                if (request.getMethod() == Method.POST) {
                        if (request.getHttpRequest().getPartAsStringFailsafe("confirm", 4).equals("true")) {
-                               fieldId = request.getHttpRequest().getParam("field");
-                               field = profile.getFieldById(fieldId);
-                               if (field == null) {
-                                       throw new RedirectException("invalid.html");
-                               }
                                profile.removeField(field);
                                currentSone.setProfile(profile);
                        }