Skip to content

Commit

Permalink
only update markdown contents when needed
Browse files Browse the repository at this point in the history
prevents un-needed updates
  • Loading branch information
imnotjames committed Mar 21, 2020
1 parent 0f0bdfd commit 54bb7c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion notion_docs_sync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ def sync_markdown_blocks_to_block(markdown_blocks, block):
# Manually set the title property to bypass the `markdown_to_notion` in `notion-py`
# This is because it chokes up on URLs and really we just don't need this 'cause
# we're parsing the markdown ourselves.
child_block.set(["properties", "title"], markdown_contents)
if child_block.get(["properties", "title"]) != markdown_contents:
child_block.set(["properties", "title"], markdown_contents)

touched_blocks.add(child_block.id)

Expand Down

0 comments on commit 54bb7c8

Please sign in to comment.