diff --git a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/orcidtoresultfromsemrel/SparkOrcidToResultFromSemRelJob.java b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/orcidtoresultfromsemrel/SparkOrcidToResultFromSemRelJob.java index e90e43a204..436a53cbe0 100644 --- a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/orcidtoresultfromsemrel/SparkOrcidToResultFromSemRelJob.java +++ b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/orcidtoresultfromsemrel/SparkOrcidToResultFromSemRelJob.java @@ -108,7 +108,7 @@ public class SparkOrcidToResultFromSemRelJob { return value -> { R ret = value._1(); Optional rol = Optional.ofNullable(value._2()); - if (rol.isPresent()) { + if (rol.isPresent() && Optional.ofNullable(ret.getAuthor()).isPresent()) { List toenrich_author = ret.getAuthor(); List autoritativeAuthors = rol.get().getAuthorList(); for (Author author : toenrich_author) {