fix NPE
This commit is contained in:
parent
004a9193bb
commit
8fec60ea35
|
@ -506,7 +506,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
|
|||
treatment.carbs = detailedBolusInfo.carbs;
|
||||
treatment.source = detailedBolusInfo.source;
|
||||
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);
|
||||
boolean newRecordCreated = creatOrUpdateResult.newRecord;
|
||||
//log.debug("Adding new Treatment record" + treatment.toString());
|
||||
|
|
Loading…
Reference in a new issue