Skip to content

Commit

Permalink
Merge pull request #12533 from msm1992/master-3079
Browse files Browse the repository at this point in the history
Fix API policy dropping issue after migration
  • Loading branch information
msm1992 authored Sep 3, 2024
2 parents 37622cc + b967df6 commit 6ee109a
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6781,6 +6781,13 @@ public Environment getEnvironment(String organization, String uuid) throws APIMa
@Override
public void setOperationPoliciesToURITemplates(String apiId, Set<URITemplate> uriTemplates)
throws APIManagementException {
//In case the mediation sequences are not migrated yet with an API update, force an API update to make sure
// the existing API sequences are migrated to API Policies
API api = getAPIbyUUID(apiId, organization);
if (APIUtil.isSequenceDefined(api.getInSequence()) || APIUtil.isSequenceDefined(api.getOutSequence())
|| APIUtil.isSequenceDefined(api.getFaultSequence())) {
migrateMediationPoliciesOfAPI(api, tenantDomain, true);
}

Set<URITemplate> uriTemplatesWithPolicies = apiMgtDAO.getURITemplatesWithOperationPolicies(apiId);

Expand Down

0 comments on commit 6ee109a

Please sign in to comment.