fix EXTENDEDBOLUS search in db

This commit is contained in:
Milos Kozak 2018-09-10 23:57:24 +02:00
parent 2fbf4324d5
commit 3416f77a04

View file

@ -1068,7 +1068,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
where.eq("pumpId", extendedBolus.pumpId); where.eq("pumpId", extendedBolus.pumpId);
PreparedQuery<ExtendedBolus> preparedQuery = queryBuilder.prepare(); PreparedQuery<ExtendedBolus> preparedQuery = queryBuilder.prepare();
List<ExtendedBolus> trList = getDaoExtendedBolus().query(preparedQuery); List<ExtendedBolus> trList = getDaoExtendedBolus().query(preparedQuery);
if (trList.size() > 0) { if (trList.size() > 1) {
log.error("EXTENDEDBOLUS: Multiple records found for pumpId: " + extendedBolus.pumpId); log.error("EXTENDEDBOLUS: Multiple records found for pumpId: " + extendedBolus.pumpId);
return false; return false;
} }