fix sql error on add treatment

This commit is contained in:
Milos Kozak 2016-07-03 21:10:03 +02:00
parent ec3b74aad2
commit 9aa1a451e5

View file

@ -276,7 +276,7 @@ public class DataService extends IntentService {
treatment.created_at = new Date(trJson.getLong("mills")); treatment.created_at = new Date(trJson.getLong("mills"));
treatment.setTimeIndex(treatment.getTimeIndex()); treatment.setTimeIndex(treatment.getTimeIndex());
try { try {
MainApp.getDbHelper().getDaoTreatments().create(treatment); MainApp.getDbHelper().getDaoTreatments().createOrUpdate(treatment);
if (Config.logIncommingData) if (Config.logIncommingData)
log.debug("ADD: Stored treatment: " + treatment.log()); log.debug("ADD: Stored treatment: " + treatment.log());
} catch (SQLException e) { } catch (SQLException e) {