Skip to content

Commit

Permalink
Fix term updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Alemiz112 committed Mar 25, 2023
1 parent b8c90e4 commit 6330e60
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6330e60

Please sign in to comment.