From f3147925386d19060b28f7cca765c5bae129538c Mon Sep 17 00:00:00 2001 From: Diogo Correia Date: Tue, 28 Nov 2023 10:50:51 +0100 Subject: [PATCH] fix(core): duplicate translations after performing database upload (#352) Fixes #351 --- .../java/com/rexcantor64/triton/storage/MysqlStorage.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/rexcantor64/triton/storage/MysqlStorage.java b/core/src/main/java/com/rexcantor64/triton/storage/MysqlStorage.java index b3ec2762..0e9b5a75 100644 --- a/core/src/main/java/com/rexcantor64/triton/storage/MysqlStorage.java +++ b/core/src/main/java/com/rexcantor64/triton/storage/MysqlStorage.java @@ -271,7 +271,10 @@ public boolean uploadPartiallyToStorage(ConcurrentHashMap co } TWINData twin = item.getTwinData(); - if (twin == null) twin = new TWINData(); + if (twin == null) { + twin = new TWINData(); + item.setTwinData(twin); + } twin.ensureValid(); translationsStatement.setString(9, twin.getId().toString());