Use a modifier to set the latest edition of a Sone.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneInserter.java
index c4d2e85..12abc53 100644 (file)
@@ -245,7 +245,7 @@ public class SoneInserter extends AbstractService {
                                                        break;
                                                }
                                                sone.setTime(insertTime);
-                                               sone.setLatestEdition(finalUri.getEdition());
+                                               sone.modify().setLatestEdition(finalUri.getEdition()).update();
                                                core.touchConfiguration();
                                                success = true;
                                                logger.log(Level.INFO, String.format("Inserted Sone ā€œ%sā€ at %s.", sone.getName(), finalUri));