TreatmentService.createOrUpdate: log invalid argument.
This commit is contained in:
parent
843fccb86c
commit
e7c7ce32bb
1 changed files with 4 additions and 0 deletions
|
@ -280,6 +280,10 @@ public class TreatmentService extends OrmLiteBaseService<DatabaseHelper> {
|
||||||
|
|
||||||
// return true if new record is created
|
// return true if new record is created
|
||||||
public UpdateReturn createOrUpdate(Treatment treatment) {
|
public UpdateReturn createOrUpdate(Treatment treatment) {
|
||||||
|
if (treatment != null && treatment.source == Source.NONE) {
|
||||||
|
log.error("Coder error: source is not set for treatment: " + treatment, new Exception());
|
||||||
|
FabricPrivacy.logException(new Exception("Coder error: source is not set for treatment: " + treatment));
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
Treatment old;
|
Treatment old;
|
||||||
treatment.date = DatabaseHelper.roundDateToSec(treatment.date);
|
treatment.date = DatabaseHelper.roundDateToSec(treatment.date);
|
||||||
|
|
Loading…
Reference in a new issue