Fix timeline activity missing updated fields (#5854)
## Before <img width="883" alt="Screenshot 2024-06-13 at 14 48 05" src="https://github.com/twentyhq/twenty/assets/1834158/0e72ead1-2d59-4ee3-af3b-dfdd593b7f2e"> ## After <img width="908" alt="Screenshot 2024-06-13 at 14 48 14" src="https://github.com/twentyhq/twenty/assets/1834158/00e32ddf-e40d-4cc9-a80a-9f5b76bd377a">
This commit is contained in:
@ -35,6 +35,17 @@ export class TimelineActivityRepository {
|
||||
workspaceId,
|
||||
);
|
||||
|
||||
// If the diff is empty, we don't need to insert or update an activity
|
||||
// this should be handled differently, events should not be triggered when we will use proper DB events.
|
||||
const isDiffEmpty =
|
||||
properties.diff !== null &&
|
||||
properties.diff &&
|
||||
Object.keys(properties.diff).length === 0;
|
||||
|
||||
if (isDiffEmpty) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (recentTimelineActivity.length !== 0) {
|
||||
const newProps = objectRecordDiffMerge(
|
||||
recentTimelineActivity[0].properties,
|
||||
|
||||
Reference in New Issue
Block a user