Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/DQ-165' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
bichitra95 committed Aug 5, 2024
2 parents 0837290 + 0cb18dd commit 43cbc54
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ private void processCreateContract(AtlasEntity entity, EntityMutationContext con

boolean contractSync = syncContractCertificateStatus(entity, contract);
contractString = DataContract.serialize(contract);
entity.setAttribute(ATTR_CONTRACT, contractString);
if (!isContractYaml(entity)) {
entity.setAttribute(ATTR_CONTRACT, contractString);
}
String contractStringJSON = DataContract.serializeJSON(contract);
entity.setAttribute(ATTR_CONTRACT_JSON, contractStringJSON);

Expand Down Expand Up @@ -298,4 +300,8 @@ private static String getContractString(AtlasEntity entity) {
}
return contractString;
}

private static boolean isContractYaml(AtlasEntity entity) {
return !StringUtils.isEmpty((String) entity.getAttribute(ATTR_CONTRACT));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void linkBusinessPolicy(@PathParam("policyId") final String policyGuid, f
// Set request context parameters
RequestContext.get().setIncludeClassifications(false);
RequestContext.get().setIncludeMeanings(false);
RequestContext.get().getRequestContextHeaders().put("route", "business-policy-rest");
RequestContext.get().getRequestContextHeaders().put("x-atlan-route", "business-policy-rest");

AtlasPerfTracer perf = null;
try {
Expand Down Expand Up @@ -95,7 +95,7 @@ public void unlinkBusinessPolicy(@PathParam("policyId") final String policyGuid,
// Set request context parameters
RequestContext.get().setIncludeClassifications(false);
RequestContext.get().setIncludeMeanings(false);
RequestContext.get().getRequestContextHeaders().put("route", "business-policy-rest");
RequestContext.get().getRequestContextHeaders().put("x-atlan-route", "business-policy-rest");

AtlasPerfTracer perf = null;
try {
Expand Down

0 comments on commit 43cbc54

Please sign in to comment.