Skip to content

Commit 6b9dc43

Browse files
authored
Merge pull request #145 from RADAR-base/fix/user
Fix isComplete check for User
2 parents 2c3bc7e + f7d3f33 commit 6b9dc43

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)