Skip to content

Commit c1cb6d3

Browse files
pranaydubeymicrosoftPranay Dubey
andauthored
fix(Designer): Skip non-dependent parameters in updateParameterAndDependencies (#4112)
* explicitly exclude attachment fields from updateParameterAndDependencies * update logging message to be more descriptive --------- Co-authored-by: Pranay Dubey <pradubey@microsoft.com>
1 parent b9a9e22 commit c1cb6d3

File tree

1 file changed

+10
-4
lines changed
  • libs/designer/src/lib/core/utils/parameters

1 file changed

+10
-4
lines changed

libs/designer/src/lib/core/utils/parameters/helper.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import {
5555
isVariableToken,
5656
ValueSegmentConvertor,
5757
} from './segment';
58-
import { OperationManifestService, WorkflowService } from '@microsoft/designer-client-services-logic-apps';
58+
import { LogEntryLevel, LoggerService, OperationManifestService, WorkflowService } from '@microsoft/designer-client-services-logic-apps';
5959
import type {
6060
AuthProps,
6161
ComboboxItem,
@@ -1700,9 +1700,15 @@ export async function updateParameterAndDependencies(
17001700
const inputDependencies = dependenciesToUpdate.inputs;
17011701
for (const key of Object.keys(inputDependencies)) {
17021702
if (inputDependencies[key].dependencyType === 'ListValues' && inputDependencies[key].dependentParameters[parameterId]) {
1703-
const dependentParameter = nodeInputs.parameterGroups[groupId].parameters.find(
1704-
(param) => param.parameterKey === key
1705-
) as ParameterInfo;
1703+
const dependentParameter = nodeInputs.parameterGroups[groupId].parameters.find((param) => param.parameterKey === key);
1704+
if (!dependentParameter) {
1705+
LoggerService().log({
1706+
level: LogEntryLevel.Verbose,
1707+
area: 'UpdateParameterAndDependencies',
1708+
message: `Dependent parameter was not set. Connection name: ${connectionReference.connectionName} - Parameter key: ${key}`,
1709+
});
1710+
continue;
1711+
}
17061712
payload.parameters.push({
17071713
groupId,
17081714
parameterId: dependentParameter.id,

0 commit comments

Comments
 (0)