Skip to content

Commit

Permalink
POLICY-165 Policy rules related attributes updated
Browse files Browse the repository at this point in the history
  • Loading branch information
arpit-at committed Nov 13, 2024
1 parent ac4f849 commit 063d578
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4801,9 +4801,7 @@ private Optional<AtlasVertex> processAssetPolicy(String assetGuid, Set<String> n
private Optional<AtlasVertex> updateAssetPolicies(AtlasVertex vertex, Set<String> currentPolicies, Set<String> policiesToAdd) {
Set<String> existingPolicies = new HashSet<>(currentPolicies);
Set<String> updatedPolicies = new HashSet<>(currentPolicies);
updatedPolicies.addAll(policiesToAdd);

vertex.setProperty(ASSET_POLICY_GUIDS, updatedPolicies);
updatedPolicies.forEach(policyGuid -> vertex.setProperty(ASSET_POLICY_GUIDS, updatedPolicies));
vertex.setProperty(ASSET_POLICIES_COUNT, updatedPolicies.size());
updateModificationMetadata(vertex);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ public BusinessPolicyREST(AtlasEntityStore entitiesStore) {

/**
* Links a business policy to entities.
*
* @param policyGuid the ID of the policy to be linked
* @param request the request containing the GUIDs of the assets to link the policy to
* @throws AtlasBaseException if there is an error during the linking process
*/
@POST
@Path("/{policyId}/link-business-policy")
@Path("/link-business-policy")
@Timed
public void linkBusinessPolicy(final LinkBusinessPolicyRequest request) throws AtlasBaseException {
AtlasPerfMetrics.MetricRecorder metric = RequestContext.get().startMetricRecord("linkBusinessPolicy");
Expand Down

0 comments on commit 063d578

Please sign in to comment.