From 8e7e389d1d9bd3051d5488dd3ee1d411ad71e8c1 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Wed, 20 Dec 2023 15:57:17 +0200 Subject: [PATCH] fix: context updated event now does stores correct fields (#5705) --- src/lib/services/context-service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/services/context-service.ts b/src/lib/services/context-service.ts index e934718a7910..81c2e265392d 100644 --- a/src/lib/services/context-service.ts +++ b/src/lib/services/context-service.ts @@ -140,11 +140,13 @@ class ContextService { // update await this.contextFieldStore.update(value); + + const { createdAt, sortOrder, ...previousContextField } = contextField; await this.eventService.storeEvent({ type: CONTEXT_FIELD_UPDATED, createdBy: userName, createdByUserId: updatedByUserId, - preData: contextField, + preData: previousContextField, data: value, }); }