Skip to content

Commit

Permalink
fix(channel): fix legacy draft model presets (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosCortizasCT authored Nov 26, 2024
1 parent d385d65 commit 2ff2954
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/tough-scissors-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@commercetools-test-data/channel': patch
---

There was an error with the legacy `ChannelDraft` model presets as it was always using the `GraphQL` ones instead of relying on the `build` method used (`buildRest` or `buildGraphql`).
12 changes: 6 additions & 6 deletions models/channel/src/channel-draft/presets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ export const graphqlPresets = {

export const compatPresets = {
empty: empty.compatPreset,
withGeoLocationOnly: withGeoLocationOnly.graphqlPreset,
withGeoLocationOnly: withGeoLocationOnly.compatPreset,
withInventorySupplyAndProductDistributionRoles:
withInventorySupplyAndProductDistributionRoles.graphqlPreset,
withInventorySupplyAndProductDistributionRoles.compatPreset,
withInventorySupplyAndProductDistributionRolesNoAddress:
withInventorySupplyAndProductDistributionRolesNoAddress.graphqlPreset,
withInventorySupplyRole: withInventorySupplyRole.graphqlPreset,
withInventorySupplyAndProductDistributionRolesNoAddress.compatPreset,
withInventorySupplyRole: withInventorySupplyRole.compatPreset,
withInventorySupplyRoleNoAddress:
withInventorySupplyRoleNoAddress.graphqlPreset,
withProductDistributionRole: withProductDistributionRole.graphqlPreset,
withInventorySupplyRoleNoAddress.compatPreset,
withProductDistributionRole: withProductDistributionRole.compatPreset,
sampleDataB2B: sampleDataB2B.compatPresets,
sampleDataB2CLifestyle: sampleDataB2C.compatPresets,
};

0 comments on commit 2ff2954

Please sign in to comment.