This commit is contained in:
Johannes Mockenhaupt 2018-07-01 18:25:32 +02:00
parent 6ebb13d28d
commit 9b7d36ffed
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -330,7 +330,7 @@ public class TreatmentService extends OrmLiteBaseService<DatabaseHelper> {
List<Treatment> result = getDao().query(preparedQuery); List<Treatment> result = getDao().query(preparedQuery);
switch (result.size()) { switch (result.size()) {
case 0: return null; case 0: return null;
case 1: return result.get(1); case 1: return result.get(0);
default: throw new RuntimeException("Multiple records with the same pump id found: " + result.toString()); default: throw new RuntimeException("Multiple records with the same pump id found: " + result.toString());
} }
} catch (SQLException e) { } catch (SQLException e) {