Remove the possibility to create images for unknown IDs.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / EditAlbumPage.java
index 9e4aae9..5e07011 100644 (file)
@@ -68,7 +68,7 @@ public class EditAlbumPage extends SoneTemplatePage {
                                throw new RedirectException("imageBrowser.html?album=" + album.getParent().getId());
                        }
                        String albumImageId = request.getHttpRequest().getPartAsStringFailsafe("album-image", 36);
-                       if (webInterface.getCore().getImage(albumImageId, false) == null) {
+                       if (!webInterface.getCore().getImage(albumImageId).isPresent()) {
                                albumImageId = null;
                        }
                        album.modify().setAlbumImage(albumImageId).update();