Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ public Map<String, ImportPreviewStatistics> process(ImportUpload upload, List<Br
private void processNewGermplasm(Germplasm germplasm, ValidationErrors validationErrors, Map<String, ProgramBreedingMethodEntity> breedingMethods,
List<String> badBreedingMethods,
Program program, UUID importListId, boolean commit, PendingImport mappedImportRow, int i, User user, Supplier<BigInteger> nextVal) {
germplasm = removeBreedingMethodBlanks(germplasm);
// Get the breeding method database object
ProgramBreedingMethodEntity breedingMethod = null;
if (germplasm.getBreedingMethod() != null) {
Expand Down Expand Up @@ -358,6 +359,14 @@ private void processNewGermplasm(Germplasm germplasm, ValidationErrors validatio
importList.addDataItem(newGermplasm.getGermplasmName());
}

// Removes leading and trailing blanks from the germplasm breedingMethod
private Germplasm removeBreedingMethodBlanks(Germplasm germplasm) {
if(germplasm.getBreedingMethod() != null ) {
germplasm.setBreedingMethod(germplasm.getBreedingMethod().strip());
}
return germplasm;
}

private boolean processExistingGermplasm(Germplasm germplasm, ValidationErrors validationErrors, List<BrAPIImport> importRows, Program program, UUID importListId, boolean commit, PendingImport mappedImportRow, int rowIndex) {
BrAPIGermplasm existingGermplasm;
String gid = germplasm.getAccessionNumber();
Expand Down