Skip to content

Commit

Permalink
Merge pull request #55 from vtex-apps/fix/B2BTEAM-1933
Browse files Browse the repository at this point in the history
fix: change expire update to partial
  • Loading branch information
pabloppupulin authored Oct 31, 2024
2 parents 29bd215 + c9d7672 commit 5667607
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions node/utils/Queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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,
})
Expand Down

0 comments on commit 5667607

Please sign in to comment.