notion-py icon indicating copy to clipboard operation
notion-py copied to clipboard

Relations onto deleted blocks are still included

Open jamalex opened this issue 5 years ago • 1 comments

It seems that when there's a Relation to a record, and that record is then deleted, Notion keeps the ID of the deleted record in the Relation property, so it shows up in the results when you query the Relation field. It would probably be best to filter out records that aren't alive when returning results of a Relation lookup, so that we match what the Notion UI does. If the page is later undeleted, it would reappear in the Relation again (since we didn't remove the ID under the hood).

jamalex avatar Feb 28 '20 18:02 jamalex

Any chance of a quick example of how to do this? Struggling with deleted entries still visible in API results.

robinstauntoncollins avatar Sep 10 '21 12:09 robinstauntoncollins