Skip to content

Commit

Permalink
#889: enable DEPLOY with new custom keyField
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed May 26, 2023
1 parent cc01898 commit 4fc45c8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/metadataTypes/MobileKeyword.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class MobileKeyword extends MetadataType {
}
} else if (singleRetrieve) {
// some types will return a single item intead of an array if the key is supported by their api
this.#createCustomKeyField(body);
// ! currently, the id: prefix is only supported by journey (interaction)
if (singleRetrieve.startsWith('id:')) {
singleRetrieve = body[keyField];
Expand Down Expand Up @@ -347,9 +348,15 @@ class MobileKeyword extends MetadataType {
}. Setting to IGNORED.`
);
}
const [code, keyword] = metadata.c__codeKeyword.split('.');

// mobileCode
metadata.code.id = cache.searchForField('mobileCode', metadata.code.code, 'code', 'id');
metadata.code = {
id: cache.searchForField('mobileCode', code, 'code', 'id'),
};

// keyword
metadata.keyword = keyword;
return metadata;
}
/**
Expand Down

0 comments on commit 4fc45c8

Please sign in to comment.