Skip to content

Commit

Permalink
NPE bug fix
Browse files Browse the repository at this point in the history
Signed-off-by: Angelica Ochoa <[email protected]>
  • Loading branch information
ao508 committed Jul 10, 2024
1 parent 86c5caf commit 6c5681b
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,13 @@ private Integer getNextNucleicAcidIncrement(String nucleicAcidAbbreviation,
// to prevent accidentally giving samples the same counter
Integer maxIncrement = 0;
for (SampleMetadata sample : samples) {
// skip samples with null cmo sample name (possible now that we allow all samples to get in db
// even if they fail validation and/or fail label generation)
if (StringUtils.isBlank(sample.getCmoSampleName())) {
LOG.warn("Skipping patient sample with null CMO sample label: CMO patient ID = "
+ sample.getCmoPatientId() + ", sample primary ID = " + sample.getPrimaryId());
continue;
}
// skip cell line samples
if (CMO_CELLLINE_ID_REGEX.matcher(sample.getCmoSampleName()).find()) {
continue;
Expand Down

0 comments on commit 6c5681b

Please sign in to comment.