Skip to content

Commit

Permalink
fix(Designer): Skip non-dependent parameters in updateParameterAndDep…
Browse files Browse the repository at this point in the history
…endencies (#4112)

* explicitly exclude attachment fields from updateParameterAndDependencies

* update logging message to be more descriptive

---------

Co-authored-by: Pranay Dubey <pradubey@microsoft.com>
  • Loading branch information
pranaydubeymicrosoft and Pranay Dubey committed Feb 5, 2024
1 parent b9a9e22 commit c1cb6d3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions libs/designer/src/lib/core/utils/parameters/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import {
isVariableToken,
ValueSegmentConvertor,
} from './segment';
import { OperationManifestService, WorkflowService } from '@microsoft/designer-client-services-logic-apps';
import { LogEntryLevel, LoggerService, OperationManifestService, WorkflowService } from '@microsoft/designer-client-services-logic-apps';
import type {
AuthProps,
ComboboxItem,
Expand Down Expand Up @@ -1700,9 +1700,15 @@ export async function updateParameterAndDependencies(
const inputDependencies = dependenciesToUpdate.inputs;
for (const key of Object.keys(inputDependencies)) {
if (inputDependencies[key].dependencyType === 'ListValues' && inputDependencies[key].dependentParameters[parameterId]) {
const dependentParameter = nodeInputs.parameterGroups[groupId].parameters.find(
(param) => param.parameterKey === key
) as ParameterInfo;
const dependentParameter = nodeInputs.parameterGroups[groupId].parameters.find((param) => param.parameterKey === key);
if (!dependentParameter) {
LoggerService().log({
level: LogEntryLevel.Verbose,
area: 'UpdateParameterAndDependencies',
message: `Dependent parameter was not set. Connection name: ${connectionReference.connectionName} - Parameter key: ${key}`,
});
continue;
}
payload.parameters.push({
groupId,
parameterId: dependentParameter.id,
Expand Down

0 comments on commit c1cb6d3

Please sign in to comment.