summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/main/java
diff options
context:
space:
mode:
authorMichael Mokry <mm117s@att.com>2018-01-11 15:23:36 -0600
committerPamela Dragosh <pdragosh@research.att.com>2018-01-12 16:09:48 +0000
commit676d7d8dc9985e93d7c9cbc0412a26f2b19c23cd (patch)
treec47935e62f7e4fe5bc1439b6a3f1a58cb72b0127 /ONAP-PAP-REST/src/main/java
parent3f1933cfe1f5cdb6d3fefdff9248c9d4430849c2 (diff)
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 <mm117s@att.com>
Diffstat (limited to 'ONAP-PAP-REST/src/main/java')
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java3
1 files changed, 2 insertions, 1 deletions
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 7591781ff..bc64ba59b 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
@@ -2843,7 +2843,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();
}
}