diff --git a/CHANGELOG.md b/CHANGELOG.md index c0e1988..7dc53b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Only update Status, LastUpdate and UpdateHistory, in expired quotes + ## [2.6.3] - 2024-10-30 ### Fixed diff --git a/node/utils/Queue.ts b/node/utils/Queue.ts index d798b26..7a398e4 100644 --- a/node/utils/Queue.ts +++ b/node/utils/Queue.ts @@ -14,10 +14,6 @@ const processItem = ({ ctx, item }: { ctx: Context; item: Quote }) => { return } - if (item.viewedByCustomer === null) { - item.viewedByCustomer = false - } - const status = 'expired' const now = new Date() const nowISO = now.toISOString() @@ -37,9 +33,9 @@ const processItem = ({ ctx, item }: { ctx: Context; item: Quote }) => { updateHistory.push(update) masterdata - .updateEntireDocument({ + .updatePartialDocument({ dataEntity: QUOTE_DATA_ENTITY, - fields: { ...item, lastUpdate, updateHistory, status }, + fields: { lastUpdate, updateHistory, status }, id, schema: SCHEMA_VERSION, })