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 filtering of deleted synced sheets #4210

Merged
merged 2 commits into from
Mar 7, 2024
Merged

Conversation

flvndvd
Copy link
Contributor

@flvndvd flvndvd commented Mar 7, 2024

Description

This PR addresses an issue with the filtering logic used to determine deleted synced sheets. Previously, the code relied on the truthiness of the find() result to filter out synced sheets that were successfully imported. However, this approach could lead to incorrect filtering if a sheet ID contained the value 0, as 0 is falsy in JavaScript.

Risk

Deploy Plan

@@ -435,6 +435,7 @@ export async function syncSpreadSheet(
// List synced sheets.
const syncedSheets = await GoogleDriveSheet.findAll({
where: {
connectorId: connector.id,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🚗

@flvndvd flvndvd marked this pull request as ready for review March 7, 2024 21:02
@flvndvd
Copy link
Contributor Author

flvndvd commented Mar 7, 2024

PMRW.

@flvndvd flvndvd merged commit 50680ba into main Mar 7, 2024
5 checks passed
@flvndvd flvndvd deleted the flav/fix-delete-synced-sheet branch March 7, 2024 21:03
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