Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notion Recurse Empty Final Field #2819

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Notion Recurse Empty Final Field #2819

merged 1 commit into from
Oct 16, 2024

Conversation

yuhongsun96
Copy link
Contributor

Description

In Notion pages nested in databases, sometimes a property field can be null leading to a NoneType instead of a final value to be extracted

How Has This Been Tested?

Issue has been replicated and patched

Accepted Risk

N/A

Related Issue(s)

N/A

Checklist:

  • All of the automated tests pass
  • All PR comments are addressed and marked resolved
  • If there are migrations, they have been rebased to latest main
  • If there are new dependencies, they are added to the requirements
  • If there are new environment variables, they are added to all of the deployment methods
  • If there are new APIs that don't require auth, they are added to PUBLIC_ENDPOINT_SPECS
  • Docker images build and basic functionalities work
  • Author has done a final read through of the PR right before merge

Copy link

vercel bot commented Oct 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2024 6:03am

@yuhongsun96 yuhongsun96 merged commit c148fa5 into main Oct 16, 2024
7 checks passed
@yuhongsun96 yuhongsun96 deleted the notion-recurse-empty branch October 16, 2024 06:03
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This pull request modifies the NotionConnector class to improve handling of NoneType values in Notion properties, particularly for pages nested in databases.

  • Updated _properties_to_str method in backend/danswer/connectors/notion/connector.py to return None for empty properties instead of 'N/A'
  • Enhanced handling of list properties to prevent potential errors with null values
  • Improved error handling for unreadable properties to maintain data integrity
  • These changes aim to prevent crashes and ensure more accurate data extraction from Notion pages with varying property structures

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant