Use more convenient method from core.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / SoneTemplatePage.java
index 065950e..2953b0d 100644 (file)
@@ -137,12 +137,7 @@ public class SoneTemplatePage extends TemplatePage {
                if (soneId == null) {
                        return null;
                }
-               for (Sone sone : webInterface.getCore().getSones()) {
-                       if (sone.getId().equals(soneId)) {
-                               return sone;
-                       }
-               }
-               return null;
+               return webInterface.getCore().getLocalSone(soneId);
        }
 
        /**