Skip to content

Commit 2ff3472

Browse files
committed
Fix select external by id
1 parent d759e04 commit 2ff3472

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

rest/src/main/groovy/whelk/rest/api/ExternalEntitiesSearchAPI.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,21 @@ class ExternalEntitiesSearchAPI extends HttpServlet {
9696
}
9797

9898
List selectExternal(String iri, Collection<String> types) {
99-
def typeFilter = typeFilter(types)
99+
def theTypeFilter = typeFilter(types)
100100

101101
def inWhelk = whelk.getCards([iri])
102102
if (inWhelk[iri]) {
103-
return whelkResult(inWhelk[iri], typeFilter)
103+
return whelkResult(inWhelk[iri], theTypeFilter)
104104
}
105105

106106
return whelk.external.getEphemeral(iri).map ({ doc ->
107107
def extId = doc.getThingIdentifiers().first()
108108
inWhelk = whelk.getCards([extId])
109109
if (inWhelk[extId]) { // iri was an alias/sameAs
110-
return whelkResult(inWhelk[extId], typeFilter)
110+
return whelkResult(inWhelk[extId], theTypeFilter)
111111
}
112112

113-
if (typeFilter(types).test(doc)) {
113+
if (theTypeFilter.test(doc)) {
114114
whelk.embellish(doc)
115115
[JsonLd.frame(doc.getThingIdentifiers().first(), doc.data)]
116116
} else {

0 commit comments

Comments
 (0)