Skip to content

Commit

Permalink
Merge pull request #145 from RADAR-base/fix/user
Browse files Browse the repository at this point in the history
Fix isComplete check for User
  • Loading branch information
mpgxvii authored Jul 15, 2024
2 parents 2c3bc7e + f7d3f33 commit 6b9dc43
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ data class OuraUser(
override val observationKey: ObservationKey = ObservationKey(projectId, userId, sourceId)
override val versionedId: String = "$id${version?.let { "#$it" } ?: ""}"

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

0 comments on commit 6b9dc43

Please sign in to comment.