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 duplicated calendar events #5209

Merged
merged 3 commits into from
Apr 29, 2024
Merged

Fix duplicated calendar events #5209

merged 3 commits into from
Apr 29, 2024

Conversation

bosiraphael
Copy link
Contributor

@bosiraphael bosiraphael commented Apr 29, 2024

Fix duplicated calendar events when two workspace members participate to the same event.

@bosiraphael bosiraphael requested a review from Weiko April 29, 2024 13:16
Copy link

TODOs/FIXMEs:

  • // TODO: When we will be able to add unicity contraint on iCalUID, we will do a INSERT ON CONFLICT DO UPDATE: packages/twenty-server/src/modules/calendar/services/google-calendar-sync/google-calendar-sync.service.ts
  • // TODO: When we will be able to add unicity contraint on iCalUID, we will do a INSERT ON CONFLICT DO UPDATE: packages/twenty-server/src/modules/calendar/services/google-calendar-sync/google-calendar-sync.service.ts

Generated by 🚫 dangerJS against ea14e77

`SELECT id, "iCalUID" FROM ${dataSourceSchema}."calendarEvent" WHERE "id" = ANY($1)`,
[calendarEventIds],
`SELECT id, "iCalUID" FROM ${dataSourceSchema}."calendarEvent" WHERE "iCalUID" = ANY($1)`,
[iCalUIDs],
Copy link
Member

Choose a reason for hiding this comment

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

LGTM but keep in mind that we can't make sure this is unique from the DB as of today 👍 (compared to calendarEventIds)

@Weiko Weiko merged commit 6cafd25 into main Apr 29, 2024
5 checks passed
@Weiko Weiko deleted the fix-duplicated-calendar-events branch April 29, 2024 13:23
@bosiraphael bosiraphael linked an issue Apr 29, 2024 that may be closed by this pull request
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.

Duplicated calendar events
2 participants