Skip to content

[BUG] Project image links disappear from the database when refreshing Notion API cache #103

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

Closed
4 tasks
AntGa opened this issue Oct 15, 2024 · 0 comments
Closed
4 tasks
Labels
bug Something isn't working tech debt Technical debt needing to be fixed

Comments

@AntGa
Copy link
Contributor

AntGa commented Oct 15, 2024

Description:
Whenever I refresh the Notion API cache, the project image links in the database are getting deleted or overwritten. This issue is likely related to how the cache is refreshed and entries not present in the current Notion API query are being removed from the database, along with their associated image links. This results in images disappearing from the project pages even though they still exist in Notion.

Actions:

  • Investigate how entries are being compared between the Notion API and the database when the cache is refreshed.
  • Ensure that when an entry is missing from the current Notion API query, its associated image links are not deleted unless the project is explicitly removed from Notion.
  • Implement a validation mechanism that safely handles entries not present in the latest Notion API response but are still valid in the database.
  • Test with both valid and missing image links to ensure the cache refresh works as expected without losing data.

Acceptance Requirements:

  • Refreshing the Notion API cache does not result in image links being removed from the database if the project still exists in Notion.
  • Projects removed from the Notion API are correctly handled without affecting other project image links.
  • A log or error message is generated when an image link is about to be deleted due to a missing Notion entry, ensuring visibility into the process.
  • No image links are missing after a successful refresh of the cache.
@AntGa AntGa added bug Something isn't working tech debt Technical debt needing to be fixed labels Oct 15, 2024
@AntGa AntGa closed this as completed Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tech debt Technical debt needing to be fixed
Projects
None yet
Development

No branches or pull requests

1 participant