added check in case the author set to be enriched is null

This commit is contained in:
Miriam Baglioni 2021-06-08 12:06:10 +02:00
parent 8d2e086e48
commit dc07f1079b
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ public class SparkOrcidToResultFromSemRelJob {
return value -> {
R ret = value._1();
Optional<ResultOrcidList> rol = Optional.ofNullable(value._2());
if (rol.isPresent()) {
if (rol.isPresent() && Optional.ofNullable(ret.getAuthor()).isPresent()) {
List<Author> toenrich_author = ret.getAuthor();
List<AutoritativeAuthor> autoritativeAuthors = rol.get().getAuthorList();
for (Author author : toenrich_author) {