Skip to content

Commit

Permalink
Notion date filter fix (danswer-ai#1755)
Browse files Browse the repository at this point in the history
* fix filter logic

* make comparison better readable
  • Loading branch information
danielnaber authored Jul 2, 2024
1 parent 3ebac62 commit 2db128f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/danswer/connectors/notion/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def _filter_pages_by_time(
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

Expand Down

0 comments on commit 2db128f

Please sign in to comment.