diff --git a/orcid-core/src/main/java/org/orcid/core/utils/SourceEntityUtils.java b/orcid-core/src/main/java/org/orcid/core/utils/SourceEntityUtils.java index 69a93843665..ddf3ff0b336 100644 --- a/orcid-core/src/main/java/org/orcid/core/utils/SourceEntityUtils.java +++ b/orcid-core/src/main/java/org/orcid/core/utils/SourceEntityUtils.java @@ -103,14 +103,16 @@ public static Source extractSourceFromEntity(SourceAwareEntity e, ClientDetai // client if (!StringUtils.isEmpty(e.getClientSourceId())) { source.setSourceClientId(new SourceClientId(e.getClientSourceId())); - ClientDetailsEntity clientSource = clientDetailsEntityCacheManager.retrieve(e.getClientSourceId()); - if (clientSource.isUserOBOEnabled()) { - String orcidId = null; - if (e instanceof OrcidAware) { - orcidId = ((OrcidAware) e).getOrcid(); - } - source.setAssertionOriginOrcid(new SourceOrcid(orcidId)); - } + if(e instanceof OrcidAware) { + ClientDetailsEntity clientSource = clientDetailsEntityCacheManager.retrieve(e.getClientSourceId()); + if (clientSource.isUserOBOEnabled()) { + String orcidId = null; + if (e instanceof OrcidAware) { + orcidId = ((OrcidAware) e).getOrcid(); + } + source.setAssertionOriginOrcid(new SourceOrcid(orcidId)); + } + } } // member obo