diff --git a/dhp-workflows/dhp-graph-mapper/src/main/scala/eu/dnetlib/dhp/enrich/orcid/ORCIDAuthorEnricher.scala b/dhp-workflows/dhp-graph-mapper/src/main/scala/eu/dnetlib/dhp/enrich/orcid/ORCIDAuthorEnricher.scala index f7ea7e5a48..e2e7fada6e 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/scala/eu/dnetlib/dhp/enrich/orcid/ORCIDAuthorEnricher.scala +++ b/dhp-workflows/dhp-graph-mapper/src/main/scala/eu/dnetlib/dhp/enrich/orcid/ORCIDAuthorEnricher.scala @@ -87,7 +87,7 @@ object ORCIDAuthorEnricher extends Serializable { ) = { val matched = scala.collection.mutable.ArrayBuffer.empty[MatchedAuthors] - if (graph_authors != null && graph_authors.isEmpty) { + if (graph_authors != null && !graph_authors.isEmpty) { val ait = graph_authors.iterator while (ait.hasNext) { diff --git a/dhp-workflows/dhp-graph-mapper/src/main/scala/eu/dnetlib/dhp/enrich/orcid/SparkEnrichGraphWithOrcidAuthors.scala b/dhp-workflows/dhp-graph-mapper/src/main/scala/eu/dnetlib/dhp/enrich/orcid/SparkEnrichGraphWithOrcidAuthors.scala index e2d2182479..0824c2a71e 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/scala/eu/dnetlib/dhp/enrich/orcid/SparkEnrichGraphWithOrcidAuthors.scala +++ b/dhp-workflows/dhp-graph-mapper/src/main/scala/eu/dnetlib/dhp/enrich/orcid/SparkEnrichGraphWithOrcidAuthors.scala @@ -72,7 +72,7 @@ class SparkEnrichGraphWithOrcidAuthors(propertyPath: String, args: Array[String] .join(matched, Seq("id"), "left") .withColumn( "author", - when(size(col("enriched_author")).gt(1), col("enriched_author")) + when(size(col("enriched_author")).gt(0), col("enriched_author")) .otherwise(col("author")) ) .drop("enriched_author")