Skip to content

Commit

Permalink
#1334: ensure that event is not a permitted type in fixKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed May 23, 2024
1 parent 12508ff commit f09203c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,17 @@ class Mcdev {
for (const selectedType of Array.isArray(selectedTypesArr)
? selectedTypesArr
: Object.keys(selectedTypesArr)) {
if (selectedType === 'event') {
Util.logger.warn(
`Type 'event' is not supported for fixKeys for compatibility reasons. Draft Journeys would otherwise be broken after the key change. If you do need to update an event key, use deploy --changeKeyValue or --changeKeyField instead.`
);
if (Array.isArray(selectedTypesArr)) {
selectedTypesArr = selectedTypesArr.filter((type) => type !== 'event');
} else {
delete selectedTypesArr.event;
}
continue;
}
const temp = await this.#runMethod(
'fixKeys',
businessUnit,
Expand Down

0 comments on commit f09203c

Please sign in to comment.