Merge branch 'vouchers-fix' into 'dev'

Update Voucher.java

See merge request morningstar/Arcturus-Community!473
This commit is contained in:
Harmonic 2022-04-10 01:18:52 +00:00
commit dc73b8529b

View File

@ -38,7 +38,8 @@ public class Voucher {
}
private void loadHistory() {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT * FROM voucher_history")) {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT * FROM voucher_history WHERE voucher_id = ?")) {
statement.setInt(1, this.id);
try (ResultSet set = statement.executeQuery()) {
while (set.next()) {
this.history.add(new VoucherHistoryEntry(set));