diff --git a/src/main/java/org/sunbird/common/util/Constants.java b/src/main/java/org/sunbird/common/util/Constants.java index d0e4f2f39..223aea083 100644 --- a/src/main/java/org/sunbird/common/util/Constants.java +++ b/src/main/java/org/sunbird/common/util/Constants.java @@ -457,6 +457,8 @@ public class Constants { public static final String VALUES = "values"; public static final String PROGRAM = "Program"; public static final String LIVE = "Live"; + public static final String GOVERNMENT = "Government"; + public static final String ORGANIZATION_TYPE = "organisationType"; private Constants() { throw new IllegalStateException("Utility class"); diff --git a/src/main/java/org/sunbird/user/service/UserUtilityServiceImpl.java b/src/main/java/org/sunbird/user/service/UserUtilityServiceImpl.java index 70d1484f1..99d755e9a 100644 --- a/src/main/java/org/sunbird/user/service/UserUtilityServiceImpl.java +++ b/src/main/java/org/sunbird/user/service/UserUtilityServiceImpl.java @@ -254,13 +254,15 @@ public boolean updateUser(UserRegistration userRegistration) { personalDetails.put(Constants.PRIMARY_EMAIL, userRegistration.getEmail()); profileDetails.put(Constants.PERSONAL_DETAILS, personalDetails); + Map professionDetailObj = new HashMap(); + professionDetailObj.put(Constants.ORGANIZATION_TYPE, Constants.GOVERNMENT); if (StringUtils.isNotEmpty(userRegistration.getPosition())) { - Map professionDetailObj = new HashMap(); professionDetailObj.put(Constants.DESIGNATION, userRegistration.getPosition()); - List> professionalDetailsList = new ArrayList>(); - professionalDetailsList.add(professionDetailObj); - profileDetails.put(Constants.PROFESSIONAL_DETAILS, professionalDetailsList); } + List> professionalDetailsList = new ArrayList>(); + professionalDetailsList.add(professionDetailObj); + profileDetails.put(Constants.PROFESSIONAL_DETAILS, professionalDetailsList); + requestBody.put(Constants.PROFILE_DETAILS, profileDetails); request.put(Constants.REQUEST, requestBody); Map readData = (Map) outboundRequestHandlerService