-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
bugfix: escape destroyed objects on workers #9719
bugfix: escape destroyed objects on workers #9719
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR modifies event handling to prevent foreign key constraint violations when destroying records by filtering out events without 'after' properties before sending them to audit logs and timeline activities.
- Fixed foreign key violation in
packages/twenty-server/src/engine/api/graphql/workspace-query-runner/listeners/entity-events-to-db.listener.ts
by addingevent.properties.after
check - Incorrect type annotations in
handleDelete
andhandleDestroy
methods usingObjectRecordUpdateEvent
instead ofObjectRecordDeleteEvent
- Unfiltered events still being sent to webhookQueueService could cause similar issues
- Root cause of foreign key constraint violation may need deeper investigation rather than event filtering
💡 (5/5) You can turn off certain types of comments like style here!
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
8df2c41
to
2da33ca
Compare
...rver/src/engine/api/graphql/workspace-query-runner/listeners/entity-events-to-db.listener.ts
Outdated
Show resolved
Hide resolved
2da33ca
to
9e515e8
Compare
6da3ae8
to
1017074
Compare
Log
|
# This PR - Fixes twentyhq#9358 @FelixMalfait please check this workaround --------- Co-authored-by: Félix Malfait <[email protected]>
This PR
@FelixMalfait please check this workaround