Skip to content

Commit

Permalink
Merge pull request #2859 from atlanhq/dg-980-daap-visibility
Browse files Browse the repository at this point in the history
Fix Update Daap policy NPE
  • Loading branch information
nikhilbonte21 authored Feb 20, 2024
2 parents 019efa9 + 24ba068 commit 8accdb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ private void processUpdatePolicy(AtlasStruct entity, AtlasVertex vertex) throws

//create ES alias
parent.addReferredEntity(policy);

} if (POLICY_CATEGORY_DATAMESH.equals(policyCategory)) {
validator.validate(policy, existingPolicy, null, UPDATE);
} else {
validator.validate(policy, null, null, UPDATE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public void validate(AtlasEntity policy, AtlasEntity existingPolicy,
"Please provide valid value for attribute " + ATTR_POLICY_SUB_CATEGORY + ":"+ DATAMESH_POLICY_VALID_SUB_CATEGORIES);

//validate datamesh policy actions
Set<String> validActions = PURPOSE_POLICY_VALID_ACTIONS.get(policySubCategory);
Set<String> validActions = DATAMESH_POLICY_VALID_ACTIONS.get(policySubCategory);
List<String> copyOfActions = new ArrayList<>(policyActions);
copyOfActions.removeAll(validActions);
validateParam (CollectionUtils.isNotEmpty(copyOfActions),
Expand Down

0 comments on commit 8accdb0

Please sign in to comment.