Skip to content

Commit

Permalink
Fix for Government Organisation type in profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
karthik-tarento committed Jun 10, 2022
1 parent d6db94a commit 60cf6cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/sunbird/common/util/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,15 @@ public boolean updateUser(UserRegistration userRegistration) {
personalDetails.put(Constants.PRIMARY_EMAIL, userRegistration.getEmail());
profileDetails.put(Constants.PERSONAL_DETAILS, personalDetails);

Map<String, Object> professionDetailObj = new HashMap<String, Object>();
professionDetailObj.put(Constants.ORGANIZATION_TYPE, Constants.GOVERNMENT);
if (StringUtils.isNotEmpty(userRegistration.getPosition())) {
Map<String, Object> professionDetailObj = new HashMap<String, Object>();
professionDetailObj.put(Constants.DESIGNATION, userRegistration.getPosition());
List<Map<String, Object>> professionalDetailsList = new ArrayList<Map<String, Object>>();
professionalDetailsList.add(professionDetailObj);
profileDetails.put(Constants.PROFESSIONAL_DETAILS, professionalDetailsList);
}
List<Map<String, Object>> professionalDetailsList = new ArrayList<Map<String, Object>>();
professionalDetailsList.add(professionDetailObj);
profileDetails.put(Constants.PROFESSIONAL_DETAILS, professionalDetailsList);

requestBody.put(Constants.PROFILE_DETAILS, profileDetails);
request.put(Constants.REQUEST, requestBody);
Map<String, Object> readData = (Map<String, Object>) outboundRequestHandlerService
Expand Down

0 comments on commit 60cf6cb

Please sign in to comment.