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: Avoid creating duplicate note blocks in Notion #468

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

dvanoni
Copy link
Owner

@dvanoni dvanoni commented Feb 5, 2024

Problem

As reported in #463, duplicate "Zotero Notes" blocks end up created when note content fails to sync. This occurred because block IDs were not saved into Zotero when a note failed to sync—even though the container blocks (i.e. "Zotero Notes" and the note heading) were indeed created in Notion. Without saving the block IDs into Zotero, the next sync attempt had nothing to reference and thus created additional container blocks.

Solution

We now save block IDs before attempting to sync the note content so that, if the note content fails to sync, we've already saved references to the block IDs to be used for the next sync attempt. Additionally, if we successfully create the "Zotero Notes" container but fail to create the note heading container, we still save the block ID of the "Zotero Notes" container.

Copy link
Contributor

github-actions bot commented Feb 5, 2024

🤖 Build Bot

✅ Successful build

⬇️ Download: notero-0.5.15-402

@dvanoni dvanoni merged commit 00166c9 into main Feb 5, 2024
5 checks passed
@dvanoni dvanoni deleted the avoid-duplicate-note-blocks branch February 5, 2024 03:51
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