File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
app/src/main/java/org/simple/clinic/medicalhistory Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package org.simple.clinic.medicalhistory
33import io.reactivex.Completable
44import io.reactivex.Observable
55import io.reactivex.Single
6+ import org.simple.clinic.BuildConfig
67import org.simple.clinic.medicalhistory.sync.MedicalHistoryPayload
78import org.simple.clinic.patient.PatientUuid
89import org.simple.clinic.patient.SyncStatus
@@ -36,7 +37,11 @@ class MedicalHistoryRepository @Inject constructor(
3637 .toObservable()
3738 .map { histories ->
3839 if (histories.size > 1 ) {
39- throw AssertionError (" Multiple histories are present for $patientUuid : $histories " )
40+ if (BuildConfig .DEBUG ) {
41+ throw AssertionError (" Multiple histories are present for $patientUuid : $histories " )
42+ } else {
43+ throw AssertionError (" Multiple histories are present" )
44+ }
4045 }
4146 if (histories.isEmpty()) {
4247 // This patient's MedicalHistory hasn't synced yet. We're okay with overriding
You can’t perform that action at this time.
0 commit comments