From 2ff295413c3d3bc1c04d4f134da74f5e3e98f40e Mon Sep 17 00:00:00 2001 From: Carlos Cortizas <97907068+CarlosCortizasCT@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:58:25 +0100 Subject: [PATCH] fix(channel): fix legacy draft model presets (#719) --- .changeset/tough-scissors-cheat.md | 5 +++++ models/channel/src/channel-draft/presets/index.ts | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .changeset/tough-scissors-cheat.md diff --git a/.changeset/tough-scissors-cheat.md b/.changeset/tough-scissors-cheat.md new file mode 100644 index 000000000..34a130c98 --- /dev/null +++ b/.changeset/tough-scissors-cheat.md @@ -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`). diff --git a/models/channel/src/channel-draft/presets/index.ts b/models/channel/src/channel-draft/presets/index.ts index 35acba6f2..38983471b 100644 --- a/models/channel/src/channel-draft/presets/index.ts +++ b/models/channel/src/channel-draft/presets/index.ts @@ -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, };