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

Fix a bug in the audit system #71

Merged
merged 8 commits into from
Sep 13, 2022
Merged

Fix a bug in the audit system #71

merged 8 commits into from
Sep 13, 2022

Conversation

johndgiese
Copy link
Contributor

The Page.children property was not recursing into child blocks and as a result any child database or page that was not a top-level block would be picked up by the audit system.

This bug would affect other things too, although it was noticed due to an audit producing false positives.

The `Page.children` property was not recursing into child blocks and as
a result any child database or page that was not a top-level block would
be picked up by the audit system.

This bug would affect other things too, although it was noticed due to
an audit producing false positives.

assert external_link_in_top_page in stdoutput
assert external_link_in_child_page in stdoutput
assert internal_link_in_child_page not in stdoutput
assert external_link_in_child_database in stdoutput
assert link_to_local_page_in_database_in_column not in stdoutput
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After adding this assertion, the test failed until I updated Page.children

Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed a typo in page.py on line 42:

ensure's

Mentions in simple tables were showing up as "Untitled". I found a
workaround that should suffice for now. I will also point Notion to the
test.
This is important as we're soon going to be using link to page blocks in
an upcoming plugin.
Previosuly, the id and url properties were only available when dumping
to YAML files. There are valid use cases when these properties should be
added to markdown front matter YAML too. This commit makes them apply to
both.
@johndgiese johndgiese merged commit 50b9c09 into main Sep 13, 2022
@johndgiese johndgiese deleted the fix-bug-in-audit branch September 13, 2022 17:54
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.

None yet

3 participants