Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
samleeflang committed Oct 17, 2023
1 parent 3f5f56a commit 36b04d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ private void processUnit(DataSet dataset, Unit unit)
var attributes = digitalSpecimenDirector.assembleDigitalSpecimenTerm(unitAttributes, false);
if (attributes.getOdsNormalisedPhysicalSpecimenId() == null
|| attributes.getDwcInstitutionId() == null) {
throw new DiSSCoDataException("Cannot find a physical specimen id for specimen record");
throw new DiSSCoDataException(
"Record does not comply to MIDS level 0 (id and organisation), ignoring record");
}
var digitalSpecimen = new DigitalSpecimenWrapper(
attributes.getOdsNormalisedPhysicalSpecimenId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ private Pair<DigitalSpecimenWrapper, List<DigitalMediaObjectEvent>> createDigita
JsonNode fullRecord) throws DiSSCoDataException {
var ds = digitalSpecimenDirector.assembleDigitalSpecimenTerm(fullRecord, true);
if (ds.getOdsNormalisedPhysicalSpecimenId() == null || ds.getDwcInstitutionId() == null) {
throw new DiSSCoDataException("Cannot find a physical specimen id for specimen record");
throw new DiSSCoDataException(
"Record does not comply to MIDS level 0 (id and organisation), ignoring record");
}
return Pair.of(new DigitalSpecimenWrapper(
ds.getOdsNormalisedPhysicalSpecimenId(),
Expand Down

0 comments on commit 36b04d2

Please sign in to comment.