Skip to content

Commit

Permalink
Update institution name logic to remove 'Herbarium - ' prefix from names
Browse files Browse the repository at this point in the history
  • Loading branch information
ahakanzn committed Aug 7, 2024
1 parent 7a5cda2 commit 64eb18b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ private Institution collectionChangeSuggestionToInstitution(ChangeSuggestionDto

if (dto.getSuggestedEntity() != null) {
Collection collection = readJson(dto.getSuggestedEntity(), Collection.class);
institution.setName(collection.getName());

String name = collection.getName();
if(name.startsWith("Herbarium - ")) {
name = name.substring("Herbarium - ".length());
}
institution.setName(name);
institution.setCode(collection.getCode());
institution.setActive(collection.isActive());

Expand Down

0 comments on commit 64eb18b

Please sign in to comment.