Skip to content

Commit

Permalink
Added the missing v2 attributes when creating orgs for ROR type (#7116)
Browse files Browse the repository at this point in the history
Co-authored-by: Angel Montenegro <[email protected]>
  • Loading branch information
Camelia-Orcid and amontenegro authored Oct 30, 2024
1 parent 3528f7f commit ee4f96c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ private OrgDisambiguatedEntity processInstitute(String sourceId, String name, Is
}

// Create a new disambiguated org
OrgDisambiguatedEntity newOrg = createDisambiguatedOrg(sourceId, name, orgType, country, city, region, url);
OrgDisambiguatedEntity newOrg = createDisambiguatedOrg(sourceId, name, orgType, country, city, region, url, locationsJson, namesJson);
try {
// mark group for indexing
new OrgGrouping(newOrg, orgDisambiguatedManager).markGroupForIndexing(orgDisambiguatedDao);
Expand Down Expand Up @@ -394,7 +394,7 @@ private boolean entityChanged(OrgDisambiguatedEntity entity, String name, String
/**
* Creates a disambiguated ORG in the org_disambiguated table
*/
private OrgDisambiguatedEntity createDisambiguatedOrg(String sourceId, String name, String orgType, Iso3166Country country, String city, String region, String url) {
private OrgDisambiguatedEntity createDisambiguatedOrg(String sourceId, String name, String orgType, Iso3166Country country, String city, String region, String url,String locationsJson, String namesJson) {
LOGGER.info("Creating disambiguated org {}", name);
OrgDisambiguatedEntity orgDisambiguatedEntity = new OrgDisambiguatedEntity();
orgDisambiguatedEntity.setName(name);
Expand All @@ -405,6 +405,8 @@ private OrgDisambiguatedEntity createDisambiguatedOrg(String sourceId, String na
orgDisambiguatedEntity.setOrgType(orgType);
orgDisambiguatedEntity.setSourceId(sourceId);
orgDisambiguatedEntity.setSourceType(OrgDisambiguatedSourceType.ROR.name());
orgDisambiguatedEntity.setLocationsJson(locationsJson);
orgDisambiguatedEntity.setNamesJson(namesJson);
orgDisambiguatedManager.createOrgDisambiguated(orgDisambiguatedEntity);
return orgDisambiguatedEntity;
}
Expand Down

0 comments on commit ee4f96c

Please sign in to comment.