Skip to content

Commit

Permalink
edge case missed
Browse files Browse the repository at this point in the history
Incase all options are true
error should be thrown
  • Loading branch information
hr2904 committed May 1, 2024
1 parent 0ec7b74 commit 160e7bd
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3579,7 +3579,7 @@ public void updateClassifications(EntityMutationContext context, String guid, Li
Boolean updatedRestrictPropagationThroughLineage = classification.getRestrictPropagationThroughLineage();
Boolean currentRestrictPropagationThroughHierarchy = currentClassification.getRestrictPropagationThroughHierarchy();
Boolean updatedRestrictPropagationThroughHierarchy = classification.getRestrictPropagationThroughHierarchy();

String propagationMode = entityRetriever.determinePropagationMode(updatedRestrictPropagationThroughLineage, updatedRestrictPropagationThroughHierarchy);
if ((!Objects.equals(updatedRemovePropagations, currentRemovePropagations) ||
!Objects.equals(currentTagPropagation, updatedTagPropagation) ||
!Objects.equals(currentRestrictPropagationThroughLineage, updatedRestrictPropagationThroughLineage)) &&
Expand Down Expand Up @@ -3607,11 +3607,7 @@ public void updateClassifications(EntityMutationContext context, String guid, Li
deleteDelegate.getHandler().removeTagPropagation(classificationVertex);
}
if (CollectionUtils.isEmpty(entitiesToPropagateTo)) {
String propagationMode;
if (updatedRemovePropagations !=null) {
propagationMode = entityRetriever.determinePropagationMode(updatedRestrictPropagationThroughLineage, updatedRestrictPropagationThroughHierarchy);
}
else{
if (updatedRemovePropagations ==null) {
propagationMode = CLASSIFICATION_PROPAGATION_MODE_DEFAULT;
}
Boolean toExclude = propagationMode == CLASSIFICATION_VERTEX_RESTRICT_PROPAGATE_THROUGH_LINEAGE ? true : false;
Expand Down

0 comments on commit 160e7bd

Please sign in to comment.