From 49c6b1bf604c3450b729dc348af36ee3af79589b Mon Sep 17 00:00:00 2001 From: Michael Mokry Date: Thu, 11 Jan 2018 15:23:36 -0600 Subject: PDPGroup Audit Fix *This fix will add new group to GroupEntity table if no default exists during initialization and therefore provides a permanent solution to the initialization errors on the PAP Change-Id: Ie394d76b9cbc02cad15d62d6adea6fc17938f734 Issue-ID: POLICY-486 Signed-off-by: Michael Mokry (cherry picked from commit 676d7d8dc9985e93d7c9cbc0412a26f2b19c23cd) --- .../java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ONAP-PAP-REST') diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java index 70745b9b3..b2fb3e5a8 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java @@ -2839,7 +2839,8 @@ public class PolicyDBDao { try{ while(policyIt.hasNext()){ PolicyEntity pol = policyIt.next(); - if(getPolicyNameAndVersionFromPolicyFileName(pol.getPolicyName())[0].equals(policyName)){ + if(policy.getScope().equals(pol.getScope()) && + getPolicyNameAndVersionFromPolicyFileName(pol.getPolicyName())[0].equals(policyName)) { policyIt.remove(); } } -- cgit 1.2.3-korg