Docker changes and Music Integration
[portal.git] / ecomp-portal-BE-common / src / main / java / org / onap / portalapp / portal / controller / RoleManageController.java
index 6a8be89..dbea91f 100644 (file)
@@ -78,6 +78,7 @@ import org.onap.portalapp.portal.utils.PortalConstants;
 import org.onap.portalapp.util.EPUserUtils;
 import org.onap.portalsdk.core.domain.AuditLog;
 import org.onap.portalsdk.core.domain.Role;
+import org.onap.portalsdk.core.domain.RoleFunction;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.portalsdk.core.service.AuditService;
 import org.onap.portalsdk.core.util.SystemProperties;
@@ -505,7 +506,7 @@ public class RoleManageController extends EPRestrictedBaseController {
                                        String code = roleFunc.getType()+PIPE+roleFunc.getCode()+PIPE+roleFunc.getAction();
                                        CentralV2RoleFunction domainRoleFunction = externalAccessRolesService.getRoleFunction(code,
                                                        requestedApp.getUebKey());
-                                       if(domainRoleFunction.getType() == null || domainRoleFunction.getAction() == null) {
+                                       if(domainRoleFunction != null && (domainRoleFunction.getType() == null || domainRoleFunction.getAction() == null)) {
                                                addIfTypeActionDoesNotExits(domainRoleFunction);
                                        }
                                        boolean isSave =  true;