Skip to content

Commit

Permalink
Fix for sbRootOrgId value.
Browse files Browse the repository at this point in the history
  • Loading branch information
karthik-tarento committed Jul 8, 2022
1 parent 5a4c821 commit db034a8
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,9 @@ private String findRootOrgId(String orgName, String mapId) {
// We are going to search only 3 times
for (int i = 0; i < 3; i++) {
Map<String, Object> searchRequest = new HashMap<String, Object>();
searchRequest.put(Constants.ORG_NAME, orgName);
if (StringUtils.isNotEmpty(orgName)) {
searchRequest.put(Constants.ORG_NAME, orgName);
}
searchRequest.put(Constants.MAP_ID, mapId);

List<Map<String, Object>> existingDataList = cassandraOperation.getRecordsByProperties(
Expand All @@ -332,8 +334,8 @@ private String findRootOrgId(String orgName, String mapId) {
if (Constants.SPV.equalsIgnoreCase(parentMapId)) {
return (String) data.get(Constants.SB_ORG_ID);
} else {
mapId = (String) data.get(Constants.MAP_ID);
orgName = (String) data.get(Constants.ORG_NAME);
mapId = (String) data.get(Constants.PARENT_MAP_ID);
orgName = StringUtils.EMPTY;
continue;
}
} else {
Expand Down

0 comments on commit db034a8

Please sign in to comment.