Notion date filter fix (#1755)

* fix filter logic

* make comparison better readable
This commit is contained in:
Daniel Naber 2024-07-03 00:39:35 +02:00 committed by GitHub
parent 3ebac6256f
commit 2db128fb36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -368,7 +368,7 @@ class NotionConnector(LoadConnector, PollConnector):
compare_time = time.mktime(
time.strptime(page[filter_field], "%Y-%m-%dT%H:%M:%S.000Z")
)
if compare_time <= end or compare_time > start:
if compare_time > start and compare_time <= end:
filtered_pages += [NotionPage(**page)]
return filtered_pages