Skip to content

Commit

Permalink
Fix unselected control handling for #232
Browse files Browse the repository at this point in the history
This may be a business logic error or perhaps at one time there was/is
a valid reason, but as it stands the BasicIndexer would detect
unselected controls for resolution of the profile but only drop them
when their parent was selected for the default strategy of flattening.
For simple trees where c1 is the root control and c1.1 is the child, so
c1 -> c1.1, c1 was not being correctly removed.

NOTE: Logging indicates a double index of c1.1 even with this change
so that still needs to be fixed most likely to resolve this issue.
  • Loading branch information
aj-stein-nist committed Feb 1, 2024
1 parent fd95852 commit 37fcc27
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,7 @@ public DefaultResult visitControl(
childResult.applyTo(control);
} else {
// remove this control and promote any needed children

if (SelectionStatus.SELECTED.equals(index.getSelectionStatus(parent))) {
retval.removeControl(control);
}
retval.removeControl(control);
retval.appendPromoted(ObjectUtils.notNull(childResult));
index.removeItem(entity);

Expand Down

0 comments on commit 37fcc27

Please sign in to comment.