@@ -3590,6 +3590,7 @@ public void updateClassifications(EntityMutationContext context, String guid, Li
3590
3590
if (CollectionUtils .isEmpty (classifications )) {
3591
3591
throw new AtlasBaseException (AtlasErrorCode .INVALID_CLASSIFICATION_PARAMS , "update" , guid );
3592
3592
}
3593
+ entityRetriever .verifyClassificationsPropagationMode (classifications );
3593
3594
3594
3595
AtlasVertex entityVertex = AtlasGraphUtilsV2 .findByGuid (this .graph , guid );
3595
3596
@@ -3711,7 +3712,21 @@ public void updateClassifications(EntityMutationContext context, String guid, Li
3711
3712
Boolean updatedRestrictPropagationThroughLineage = classification .getRestrictPropagationThroughLineage ();
3712
3713
Boolean currentRestrictPropagationThroughHierarchy = currentClassification .getRestrictPropagationThroughHierarchy ();
3713
3714
Boolean updatedRestrictPropagationThroughHierarchy = classification .getRestrictPropagationThroughHierarchy ();
3714
- String propagationMode = entityRetriever .determinePropagationMode (updatedRestrictPropagationThroughLineage , updatedRestrictPropagationThroughHierarchy );
3715
+ if (updatedRestrictPropagationThroughLineage == null ) {
3716
+ updatedRestrictPropagationThroughLineage = currentRestrictPropagationThroughLineage ;
3717
+ classification .setRestrictPropagationThroughLineage (updatedRestrictPropagationThroughLineage );
3718
+ }
3719
+ if (updatedRestrictPropagationThroughHierarchy == null ) {
3720
+ updatedRestrictPropagationThroughHierarchy = currentRestrictPropagationThroughHierarchy ;
3721
+ classification .setRestrictPropagationThroughHierarchy (updatedRestrictPropagationThroughHierarchy );
3722
+ }
3723
+
3724
+ String propagationMode = CLASSIFICATION_PROPAGATION_MODE_DEFAULT ;
3725
+ if (updatedTagPropagation ) {
3726
+ // determinePropagationMode also validates the propagation restriction option values
3727
+ propagationMode = entityRetriever .determinePropagationMode (updatedRestrictPropagationThroughLineage , updatedRestrictPropagationThroughHierarchy );
3728
+ }
3729
+
3715
3730
if ((!Objects .equals (updatedRemovePropagations , currentRemovePropagations ) ||
3716
3731
!Objects .equals (currentTagPropagation , updatedTagPropagation ) ||
3717
3732
!Objects .equals (currentRestrictPropagationThroughLineage , updatedRestrictPropagationThroughLineage )) &&
@@ -3733,7 +3748,6 @@ public void updateClassifications(EntityMutationContext context, String guid, Li
3733
3748
if (updatedTagPropagation ) {
3734
3749
if (updatedRestrictPropagationThroughLineage != null && !currentRestrictPropagationThroughLineage && updatedRestrictPropagationThroughLineage ) {
3735
3750
deleteDelegate .getHandler ().removeTagPropagation (classificationVertex );
3736
-
3737
3751
}
3738
3752
if (updatedRestrictPropagationThroughHierarchy != null && !currentRestrictPropagationThroughHierarchy && updatedRestrictPropagationThroughHierarchy ) {
3739
3753
deleteDelegate .getHandler ().removeTagPropagation (classificationVertex );
0 commit comments