Skip to content

Commit f7d3f33

Browse files
committed
Fix isComplete check for User
1 parent 2c3bc7e commit f7d3f33

File tree

1 file changed

+1
-1
lines changed
  • oura-library/src/main/kotlin/org/radarbase/oura/user

1 file changed

+1
-1
lines changed

oura-library/src/main/kotlin/org/radarbase/oura/user/OuraUser.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ data class OuraUser(
2323
override val observationKey: ObservationKey = ObservationKey(projectId, userId, sourceId)
2424
override val versionedId: String = "$id${version?.let { "#$it" } ?: ""}"
2525

26-
fun isComplete() = isAuthorized && startDate.isBefore(endDate) && serviceUserId != null
26+
fun isComplete() = isAuthorized && (endDate == null || startDate.isBefore(endDate)) && serviceUserId != null
2727
}

0 commit comments

Comments
 (0)