Skip to content

Commit cbfc469

Browse files
committed
Check endDate is before current timestamp before generating requests
1 parent 144aa7e commit cbfc469

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

oura-library/src/main/kotlin/org/radarbase/oura/request/OuraRequestGenerator.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ constructor(
7676
}
7777
val endDate = user.endDate
7878
if (endDate <= startOffset) return emptySequence()
79+
if (endDate >= Instant.now()) return emptySequence()
7980
val endTime = (startOffset + defaultQueryRange).coerceAtMost(endDate)
8081
return route.generateRequests(user, startOffset, endTime)
8182
}

0 commit comments

Comments
 (0)