fix NPE
This commit is contained in:
parent
004a9193bb
commit
8fec60ea35
1 changed files with 1 additions and 1 deletions
|
@ -506,7 +506,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
|
||||||
treatment.carbs = detailedBolusInfo.carbs;
|
treatment.carbs = detailedBolusInfo.carbs;
|
||||||
treatment.source = detailedBolusInfo.source;
|
treatment.source = detailedBolusInfo.source;
|
||||||
treatment.mealBolus = treatment.carbs > 0;
|
treatment.mealBolus = treatment.carbs > 0;
|
||||||
treatment.boluscalc = detailedBolusInfo.boluscalc.toString();
|
treatment.boluscalc = detailedBolusInfo.boluscalc != null ? detailedBolusInfo.boluscalc.toString() : null;
|
||||||
TreatmentService.UpdateReturn creatOrUpdateResult = getService().createOrUpdate(treatment);
|
TreatmentService.UpdateReturn creatOrUpdateResult = getService().createOrUpdate(treatment);
|
||||||
boolean newRecordCreated = creatOrUpdateResult.newRecord;
|
boolean newRecordCreated = creatOrUpdateResult.newRecord;
|
||||||
//log.debug("Adding new Treatment record" + treatment.toString());
|
//log.debug("Adding new Treatment record" + treatment.toString());
|
||||||
|
|
Loading…
Reference in a new issue