|
|
|
|
@ -2,6 +2,7 @@ package net.pokeranalytics.android.model.utils |
|
|
|
|
|
|
|
|
|
import io.realm.RealmQuery |
|
|
|
|
import io.realm.RealmResults |
|
|
|
|
import net.pokeranalytics.android.exceptions.ModelException |
|
|
|
|
import net.pokeranalytics.android.model.realm.Session |
|
|
|
|
import net.pokeranalytics.android.model.realm.SessionSet |
|
|
|
|
import kotlin.math.max |
|
|
|
|
@ -28,10 +29,10 @@ class SessionSetManager { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (session.startDate == null) { |
|
|
|
|
throw IllegalStateException("Start date should never be null here") |
|
|
|
|
throw ModelException("Start date should never be null here") |
|
|
|
|
} |
|
|
|
|
if (session.endDate == null) { |
|
|
|
|
throw IllegalStateException("End date should never be null here") |
|
|
|
|
throw ModelException("End date should never be null here") |
|
|
|
|
} |
|
|
|
|
val endDate = session.endDate!! // tested above |
|
|
|
|
val startDate = session.startDate!! |
|
|
|
|
|