diff --git a/service/src/main/java/eu/mizerak/alemiz/translationlib/service/repository/TermsRepository.java b/service/src/main/java/eu/mizerak/alemiz/translationlib/service/repository/TermsRepository.java index 2571a53..eb010e7 100644 --- a/service/src/main/java/eu/mizerak/alemiz/translationlib/service/repository/TermsRepository.java +++ b/service/src/main/java/eu/mizerak/alemiz/translationlib/service/repository/TermsRepository.java @@ -121,7 +121,7 @@ public boolean isTermCreated(@NotNull String key) { try (PreparedStatement queryStatement = this.connection.prepareStatement("SELECT `key` FROM `terms` WHERE `key` = ?")) { queryStatement.setString(1, key); try (ResultSet query = queryStatement.executeQuery()) { - return query.getRow() > 0; + return query.next() && query.getRow() > 0; } } catch (SQLException e) { throw new IllegalStateException("Unable check if term exists " + key, e);