Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

Commit 52644c6

Browse files
authored
fix(picklist): fix org response and exclude custom metadata picklists (#1336)
Co-authored-by: R6736 <[email protected]>
1 parent 6f85c61 commit 52644c6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/core/src/package/deploymentCustomizers/PicklistEnabler.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export default class PicklistEnabler implements DeploymentCustomizer {
5858
if (!customField || customField['type'] !== 'Picklist' || !customField.valueSet?.valueSetDefinition) {
5959
continue;
6060
}
61+
//no updates for custom metadata picklists
62+
if(customField['fieldManageability']) continue;
6163

6264
let objName = fieldComponent.parent.fullName;
6365
let picklistName = fieldComponent.name;
@@ -78,7 +80,7 @@ export default class PicklistEnabler implements DeploymentCustomizer {
7880

7981
for (const value of picklistInOrg.Metadata.valueSet.valueSetDefinition.value) {
8082

81-
if (value.isActive == false) {
83+
if (value.isActive == 'false') {
8284
continue;
8385
}
8486

@@ -115,7 +117,7 @@ export default class PicklistEnabler implements DeploymentCustomizer {
115117

116118
let response = await QueryHelper.query<any>(urlId, conn, true);
117119

118-
if (response) {
120+
if (response && Array.isArray(response) && response.length > 0 && response[0].attributes) {
119121
let responseUrl = response[0].attributes.url;
120122
let fieldId = responseUrl.slice(responseUrl.lastIndexOf('.') + 1);
121123
let responsePicklist = await conn.tooling.sobject('CustomField').find({ Id: fieldId });

0 commit comments

Comments
 (0)